Get Course Replay Video List
Updated: 2022-05-23 19:00:06
Interface URL
http://api.polyv.net/live/v2/channels/playback-list
Interface Description
Query live channel
Supported Format
JSON
Request Method
GET POST
Request Limit
TRUE
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | Yes | string | The appId registered in the live streaming system |
| timestamp | Yes | string | Current time in seconds (13 digits) |
| sign | Yes | string | Signature, a 32-character uppercase MD5 value |
| courseId | Yes | string | Course ID |
| page | No | int | Page number |
| pageSize | No | int | Number of items per page |
Successful Response JSON Example:
{
"code": 200,
"status": "success",
"message": "",
"data":{
"pageNumber": 1,
"totalItems": 1,
"contents":[
{
"videoId": "3676ba2be7",
"videoPoolId": "8l8v64820d9ba661b12356d3d2ce90e7_8",
"userId": "8l8v64820d",
"channelId": 134136,
"title": "test-hl11111",
"firstImage": "http://img.videocc.net//uimage/8/8l8v64820d/7/8l8v64820d9ba661b12356d3d2ce90e7_0.jpg",
"duration": "00:01:41",
"myBr": "1",
"qid": null,
"seed": 0,
"ordertime": 0,
"createdTime": 1507794147000,
"lastModified": 1507794300000,
"asDefault": "N",
"url": "http://mpv.videocc.net/8l8v64820d/7/8l8v64820d9ba661b12356d3d2ce90e7_1.m3u8",
"channelSessionId": null,
"mergeInfo": null,
"status": "Y",
"fileUrl": "http://videolib.videocc.net/hrlemvlu0020171012150939842/recordfe-hrlemvlu0020171012150939842--20171012153617.m3u8",
"fileId": "258f5ff7ef329856332a49c50fc0db5a",
"startTime": "20171012153617"
}
],
"endRow": 1,
"startRow": 1,
"nextPageNumber": 1,
"firstPage": true,
"lastPage": true,
"prePageNumber": 1,
"totalPages": 1,
"limit": 1,
"offset": 0
}
}
Field Description
| Parameter | Type | Description |
|---|---|---|
| status | string | Status value |
| result | object | Response result |
| pageNumber | int | Page number |
| totalItems | int | Total number of items |
| vidieoId | string | Replay video table ID |
| videoPoolId | string | VOD video ID |
| url | string | MP4 video URL |
| userId | string | User ID |
| channelId | int | Channel ID |
| title | string | Video title |
| firstImage | string | Thumbnail URL |
PHP Request Example
<?php
$timestamp=time()*1000;
$appId="eh4z28vlbo";
$courseId="107269";
$appSecret = "f32c07974b2c4a1bae2a0bcc618b281c";
$str=$appSecret."appId".$appId."courseId".$channelId."timestamp".$timestamp.$appSecret;
$sign = strtoupper(md5($str));
$url="http://api.polyv.net/live/v2/channels/playback-list?appId=$appId&courseId=$courseId&sign=$sign×tamp=$timestamp";
$ch = curl_init() or die ( curl_error() );
curl_setopt( $ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 360);
$response = curl_exec ( $ch );
curl_close ( $ch );
echo $response;
?>
Signature Rules:
Arrange the request parameters in dictionary order by parameter name, concatenate the parameter name and value, prepend and append the appSecret, and generate a 32-character uppercase MD5 value as the sign.
Here is an example process:
- Request parameters:
timestamp =1489485894000
courseId="107269"
appId = "eh4z28vlbo"
2. Arrange the request parameters in dictionary order by parameter name
appId = "eh4z28vlbo"
courseId="107269"
timestamp =1489485894000
3. Concatenate the string
Concatenate the parameter name and value, prepend and append the appSecret (the appSecret value is f32c07974b2c4a1bae2a0bcc618b281c), as follows:
f32c07974b2c4a1bae2a0bcc618b281cappIdeh4z28vlbocourseId107269timestamp
1489485894000f32c07974b2c4a1bae2a0bcc618b281c
4. Generate the signature sign
18872B0CE34719CB34B15A3FB173D229
