https://api.polyv.net/hi-class-api/open/lesson/v1/getPlaybackVideo
http://api.polyv.net/hi-class-api/open/lesson/v1/getPlaybackVideo?appId=fyirmfdak4×tamp=1638782295111&sign=4FFEE70C353D7F97F9D9057A8A72E453&lessonId=1015
/**
* 查询课节回放视频
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void getPlaybackVideo() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String userId = super.userId;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "https://api.polyv.net/hi-class-api/open/lesson/v1/getPlaybackVideo";
String lessonId = "1015";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("lessonId",lessonId);
requestMap.put("sign",LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("查询课节回放视频:{}",response);
//do somethings
}
{
"code": 200,
"status": "success",
"data": [
{
"lessonId": "1015",
"lessonName": "课节1015",
"firstImage": "//s1.videocc.net/default-img/small-class/default-cover.png",
"duration": "00:00:36",
"vid": "43f5f9caa2028deb711233444540e5964_4",
"status": "61",
"createTime": "2021-11-08 10:21:32",
"videoSize": 1095207,
"playTimes": "0",
"url": "http://mpv.videocc.net/43f5f9caa2/4/43f5f9caa2028deb711233444540e5964_4.mp4"
}
],
"success": true
}
{
"code": 400,
"status": "error",
"error": {
"code": 20012,
"desc": "课节不存在"
},
"data": null,
"success": false
}