Query Video Library List
Updated: 2026-04-10 14:35:28
API Description
1、管理系统视频列表信息入口:云直播-我的直播-频道设置-回放管理-视频库-回放列表/点播列表
2、接口URL中的{channelId}为频道号
3、接口支持https协议
4、素材库类型的频道仅查询回放列表视频
API URL
http://api.polyv.net/live/v2/channel/recordFile/{channelId}/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 keys |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored 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 |
| pageSize | false | String | Number of records per page |
| listType | false | String | Video list type. Default is vod for standard live streaming, playback for three-screen layout. playback: Playback list vod: VOD list This parameter is invalid for channels of material library type; only the playback list is queried. |
| sessionIds | false | String | Session IDs, separated by commas for multiple (only queries videos sourced from channel recordings) |
| title | false | String | Playback video title, supports fuzzy search |
Example
http://api.polyv.net/live/v2/channel/recordFile/2191541/playback/list?appId=frlr1zazn3&sign=A4A5F279EC0D80E545B901982430CFE6&pageSize=10&page=1&listType=playback×tamp=1621841458928
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. Provides auxiliary error description when code is 400 or 500. |
| data | Object | Empty on failure. Contains playback video list information on success. See data field description |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| pageSize | Integer | Number of records per page |
| pageNumber | Integer | Current page number |
| totalItems | Integer | Total number of records |
| 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 |
| lastPage | Boolean | Whether it is the last page, values: true/false |
| prePageNumber | Integer | Previous page number |
| nextPageNumber | Integer | Next page number |
| limit | Integer | Number of items per page |
| totalPages | Integer | Total number of pages |
| endRow | Integer | Position of the last record on the current page in the total result set |
| offset | Integer | Pagination starting record |
Contents Parameter Description
| Parameter | Type | Description |
|---|---|---|
| videoId | String | ID generated by the live streaming system |
| videoPoolId | String | VOD video vid / Material ID |
| userId | String | POLYV user ID, same as on the POLYV official website. Path: Official website -> Login -> Live Streaming (Development Settings) |
| channelId | String | Live channel number 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: Encrypted 0: Not encrypted |
| ordertime | Integer | Sort 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 means higher priority |
| asDefault | String | Whether it is the default playback video Y: Play N: Do not play |
| url | String | Video playback URL. Note: If the video is encrypted, this URL is inaccessible. |
| channelSessionId | String | Used for PPT data requests, related to PPT live streaming playback. Value is null for standard live streaming playback. |
| status | String | Status of the associated VOD video |
| fileUrl | String | Video file URL |
| fileId | String | Temporary fileId before playback video transfer |
| startTime | String | Live streaming start time, format: yyyyMMddHHmmss |
| liveType | String | Live streaming type alone: Event live streaming ppt: Three-screen layout topclass: Large class seminar: Seminar |
| width | Integer | Video width |
| height | Integer | Video height |
| origin | String | Transfer file source manual: Manual recording auto: Automatic recording merge: Merged clip: Clipped smart-clip: Smart clipping |
| callbackUrl | String | Callback URL set during video transfer |
| errorCount | Integer | Number of processing failures |
| lang | String | Language type, default is Chinese zh_CN: Chinese EN: English |
| videoIdEN | String | English playback videoId |
| enFileUrl | String | English playback file URL |
| mergeInfo | String | Video merge information |
| watchUrl | String | URL to watch the playback video |
| originSessionId | String | Source session ID |
| subtitleList | Array | Playback subtitle list See subtitleList parameter description |
| mp4 | String | MP4 video URL (For material library videos, the anti-leech link expires in 1 day. Re-request the API after expiration.) |
subtitleList Parameter Description
| Parameter | Type | Description |
|---|---|---|
| id | Long | Subtitle ID |
| name | String | Subtitle file name |
| srtUrl | String | Subtitle file URL |
| language | String | Subtitle language |
| status | String | Subtitle status, publish--displayed, finish--not displayed |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click here to download source code. After downloading, add it to your own source project. The HttpUtil.java and LiveSignUtil.java in the test cases are included in the download 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(ChannelPlayBackTest.class);
/**
* 查询视频库列表
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testGetPlayback() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String userId = super.userId;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v2/channel/recordFile/%s/playback/list";
String channelId = "1965681";
String page = "1";
String pageSize = "10";
String listType = "playback";
url = String.format(url, channelId);
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("page", page);
requestMap.put("pageSize", pageSize);
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":10,
"pageNumber":1,
"totalItems":1,
"contents":[
{
"videoId":"1b96d90bf5",
"videoPoolId":"1b448be323e68e4404332113a57353b2_1",
"userId":"1b448be323",
"channelId":2191532,
"title":"Spring 知识精讲1111",
"firstImage":"//doc.polyv.net/images/default/blackboard.png",
"duration":"00:01:53",
"myBr":"1",
"qid":null,
"seed":0,
"ordertime":0,
"createdTime":1615515464000,
"lastModified":1615515464000,
"rank":1,
"asDefault":"N",
"url":"https://hls.videocc.net/source/1b448be323/2/1b448be323e68e4404332113a57353b2_1.m3u8",
"channelSessionId":"fwmnnydr06",
"status":"Y",
"fileUrl":"https://oss-live-2.videocc.net/record/record/recordf/1b448be323161536226913173df/1b448be323e68e4404332113a57353b2/2021-03-11-16-13-14_2021-03-11-16-15-07.m3u8",
"fileId":"94ea693e1733389ae2e7693ebdacbd43",
"startTime":"20210311161313",
"liveType":"ppt",
"width":null,
"height":null,
"origin":null,
"callbackUrl":null,
"errorCount":null,
"lang":"zh_CN",
"videoIdEN":null,
"enFileUrl":null,
"mergeinfo":"["20210311161313,113,fwmnnydr06"]",
"watchUrl":"//live.polyv.cn/watch/2191532?vid=1b96d90bf5"
}
],
"startRow":1,
"firstPage":true,
"lastPage":true,
"prePageNumber":1,
"limit":1,
"totalPages":1,
"endRow":1,
"nextPageNumber":1,
"offset":0
}
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
