Query Playback Videos for All Channels
Updated: 2025-03-07 11:50:38
API Description
1、查询账号下回放列表和点播列表, 注意:不包括暂存列表
2、接口支持https协议
API URL
http://api.polyv.net/live/v3/user/playback/list
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See details for obtaining key |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| channelId | false | String | Channel ID. If not provided, queries all playback videos under the account |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used for generating the signature is critical for communication data security and must not be saved or used directly on the client. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See signature generation rules |
| page | false | String | Page number, default is 1 |
| pageSize | false | String | Number of items per page, default is 20, valid range is 1-1000 |
| order | false | String | Sorting rule. Values: timeDesc: Sort by createdTime descending rankDesc: Sort by rank descending time: Sort by createdTime ascending rank: Sort by rank ascending, default is timeDesc |
| listType | false | String | playback: Playback list vod: VOD list, default is playback |
Example
https://api.polyv.net/live/v3/user/playback/list?categoryIds=340019%2C345134&appId=frlr1zazn3&sign=CD602DA08E520D4EA28F20554907E0F2&pageSize=2&page=2&listType=playback×tamp=1621841524123&order=timeDesc
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code. 200 indicates success, non-200 indicates failure See global error description |
| status | String | Response status text |
| message | String | Response description. When code is 400 or 500, provides additional error details |
| data | Object | Returns the list of playback videos on success See data field description |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| pageSize | Integer | Number of items per page, default 10, maximum 1000 |
| pageNumber | Integer | Current page number |
| totalItems | Integer | Total number of items |
| contents | Array | Query result list See Contents parameter description |
| startRow | Integer | Position of the first record on the current page in the total result set |
| firstPage | Boolean | Whether it is the first page, values: true/false, default false |
| lastPage | Boolean | Whether it is the last page, values: true/false, default false |
| prePageNumber | Integer | Previous page number |
| limit | Integer | Number of items per page |
| nextPageNumber | Integer | Next page number |
| endRow | Integer | Position of the last record on the current page in the total result set |
| totalPages | Integer | Total number of pages |
| offset | Integer | Pagination starting record |
Contents Parameter Description
| Parameter | Type | Description |
|---|---|---|
| videoId | String | ID generated by the live streaming system (playback video in the video library) |
| videoPoolId | String | VOD video vid (playback video in the video library) |
| userId | String | POLYV user ID, same as on the Polyv official website. Path: Official website -> Login -> Live Streaming (Development Settings) |
| channelId | String | Live streaming channel ID corresponding to the playback video |
| title | String | Video title |
| firstImage | String | Video thumbnail |
| duration | String | Video length, format HH:mm:ss |
| myBr | String | Default video playback quality 1: Smooth 2: HD 3: Ultra HD |
| qid | String | Visitor information collection ID |
| seed | Integer | Video encryption status, 1 indicates encrypted, 0 indicates not encrypted |
| ordertime | Integer | Sorting field for associated VOD videos |
| createdTime | Long | Date added as a playback video, 13-digit millisecond timestamp |
| lastModified | Long | Last modification date of the video, 13-digit millisecond timestamp |
| rank | Integer | Sort value, higher value indicates higher priority |
| asDefault | String | Whether it is the default playback video, values Y/N Y: Yes N: No |
| url | String | Video playback URL. Note: If the video is encrypted, this URL will be inaccessible |
| channelSessionId | String | Used for PPT data requests, related to PPT live streaming playback. For regular live streaming playback, the value is null |
| status | String | Completion status of transferring to VOD video. Completed: Y, Not completed: N |
| fileUrl | String | Video URL |
| fileId | String | Temporary fileId before transferring the playback video |
| startTime | String | Live streaming start time, format yyyyMMddHHmmss |
| liveType | String | Live streaming type alone: Event live streaming ppt: Three-screen topclass: Large class seminar: Seminar |
| width | Integer | Video width, returns null, specific value not returned currently |
| height | Integer | Video height, returns null, specific value not returned currently |
| origin | String | Transfer file source manual: Manual recording auto: Automatic recording merge: Merge clip: Clip smart-clip: Smart clip, returns null, specific value not returned currently |
| callbackUrl | String | Callback URL set during video transfer, returns null, specific value not returned currently |
| errorCount | Integer | Number of processing failures, returns null, specific value not returned currently |
| lang | String | Language zh_CN: Chinese EN: English, returns null, specific value not returned currently |
| videoIdEN | String | English playback videoId, returns null, specific value not returned currently |
| enFileUrl | String | English playback file URL, returns null, specific value not returned currently |
| mergeinfo | String | Video merge information |
| watchUrl | String | URL to watch the playback video |
Java Request Example
For quick integration of the base code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. HttpUtil.java and LiveSignUtil.java in the test cases are included in the downloaded file.
It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private static final Logger log = LoggerFactory.getLogger(AccountTest.class);
/**
* 查询所有频道的回放视频
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testUserPlaybackList() 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/live/v3/user/playback/list";
String categoryIds="340019,345134";
String page = "2";
String pageSize="2";
String order="timeDesc";
String listType="playback";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("categoryIds", categoryIds);
requestMap.put("page", page);
requestMap.put("pageSize", pageSize);
requestMap.put("order", order);
requestMap.put("listType", listType);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试查询所有频道的回放视频,返回值:{}", response);
//do somethings
}
Response Example
For global system error descriptions, see Global Error Description
Success Example
{
"code":200,
"status":"success",
"message":"",
"data":{
"pageSize":2,
"pageNumber":2,
"totalItems":8,
"contents":[
{
"videoId":"8073e37567",
"videoPoolId":"1b448be323a9076c9941604ac1c667f9_1",
"userId":"1b448be323",
"channelId":1965681,
"title":"Junit测试(勿删)",
"firstImage":"//doc.polyv.net/images/default/blackboard.png",
"duration":"05:15:01",
"myBr":"1",
"qid":null,
"seed":0,
"ordertime":0,
"createdTime":1610358017000,
"lastModified":1615521715000,
"rank":3,
"asDefault":"N",
"url":"https://hls.videocc.net/source/1b448be323/9/1b448be323a9076c9941604ac1c667f9_1.m3u8",
"channelSessionId":"fsz5i7qzr2",
"status":"Y",
"fileUrl":"http://oss-live-2.videocc.net/record/2020-11-12/1b448be3231603155365715c1aa/recordmerge-20201112093918.m3u8",
"fileId":"0145efa91ec0b1bf6f82cc2f6ac98abb",
"startTime":"20201028110419",
"liveType":"ppt",
"width":null,
"height":null,
"origin":null,
"callbackUrl":null,
"errorCount":null,
"lang":null,
"videoIdEN":null,
"enFileUrl":null,
"mergeinfo":"["20201028110421,18617,fsiog0shsh","20201028161448,4,fsix03jel5","20201028161455,65,fsix07id6x","20201028161618,38,fsix2mm1qj","20201028161705,119,fsix3fcffb","20201028164653,63,fsixx18b0p"]",
"watchUrl":"//live.polyv.cn/watch/1965681?vid=8073e37567"
},
{
"videoId":"b24edc10fd",
"videoPoolId":"1b448be3230a0194d959426ae005645f_1",
"userId":"1b448be323",
"channelId":1965681,
"title":"Junit测试(勿删)",
"firstImage":"//doc.polyv.net/images/default/blackboard.png",
"duration":"00:03:00",
"myBr":"1",
"qid":null,
"seed":0,
"ordertime":0,
"createdTime":1610358014000,
"lastModified":1615521715000,
"rank":2,
"asDefault":"N",
"url":"https://hls.videocc.net/source/1b448be323/f/1b448be3230a0194d959426ae005645f_1.m3u8",
"channelSessionId":"ftmnaan4l3",
"status":"Y",
"fileUrl":"https://oss-live-2.videocc.net/record/record/recordf/1b448be3231603155365715c1aa/1b448be3230a0194d959426ae005645f/2020-12-03-17-03-44_2020-12-03-17-06-53.m3u8",
"fileId":"387c5c4ca5f5d8aef24726ed3f0845b7",
"startTime":"20201203170345",
"liveType":"ppt",
"width":null,
"height":null,
"origin":null,
"callbackUrl":null,
"errorCount":null,
"lang":null,
"videoIdEN":null,
"enFileUrl":null,
"mergeinfo":"["20201203170401,174,ftmnaan4l3"]",
"watchUrl":"//live.polyv.cn/watch/1965681?vid=b24edc10fd"
}
],
"startRow":3,
"firstPage":false,
"lastPage":false,
"prePageNumber":1,
"limit":2,
"nextPageNumber":3,
"endRow":4,
"totalPages":4,
"offset":2
}
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
