private static final Logger log = LoggerFactory.getLogger(VodVideoPlayerTest.class);
/**
* 设置视频的播放器
*/
@Test
public void testSetPlayer() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userId = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v2/play/set-video-player";
String vId = "1b448be323d467dcf6a0f9cdde4e9ca0_1";
String playerId = "d4b8dDzXsT";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("userid", userId);
requestMap.put("ptime", ptime);
requestMap.put("vid", vId);
requestMap.put("playerId", playerId);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试设置视频的播放器,{}", response);
//do somethings
}