Polyv Help Center

Help Center

Get Video Library List (Returns MP4 with Transcoding)

Updated: 2022-09-02 18:08:07

Interface URL

http://api.polyv.net/live/v3/channel/playback/special-list

Interface Description

1. Purpose: Retrieves the video list information of playback videos. The returned content includes the processed MP4 address (if the playback video is merged or edited and then transcoded, the returned MP4 will be null).
2. The interface supports the HTTPS protocol.

Supported Format

JSON

Request Method

GET

Request Parameters

Parameter Required Type Description
appId Yes string Obtained from API settings, the appId registered in the live streaming system
timestamp Yes string Current 13-digit millisecond timestamp, valid within 3 minutes
page Yes string Page number, default displays 12 records per page
pageSize No string Number of records displayed per page
channelId Yes int Channel ID to query
listType No string playback - playback list, vod - VOD list; default is vod for normal live streaming scenarios, playback for three-screen scenarios
sign Yes 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

Successful Response JSON Example:

{
  "code": 200,
  "status": "success",
  "message": "",
  "data": {
    "pageNumber": 1,
    "totalItems": 3,
    "contents": [
      {
        "videoId": "6ce905500b",
        "videoPoolId": "54df86edc42918572a835cb32295895b_5",
        "userId": "54df86edc4",
        "channelId": 100000,
        "title": "保利威视",
        "firstImage": "http://img.videocc.net//uimage/5/54df86edc4/b/54df86edc42918572a835cb32295895b_0.jpg",
        "duration": "00:27:10",
        "myBr": "1",
        "qid": null,
        "seed": 0,
        "ordertime": 0,
        "createdTime": 1526018843000,
        "lastModified": 1526018940000,
        "rank": 9,
        "asDefault": "N",
        "url": "http://mpv.videocc.net/54df86edc4/b/54df86edc42918572a835cb32295895b_1.m3u8",
        "channelSessionId": null,
        "mergeInfo": "[\"20180509192019,956,f0v8mk8lfx\",\"20180510092124,673,f0v8mk8lfx\"]",
        "status": "Y",
        "fileUrl": "http://videolib.videocc.net/ec7paqepj320161102141026068/recordmerge.ec7paqepj320161102141026068_20180511140712.m3u8",
        "fileId": "dc673c60ffa36bf04743a255a2eabe61",
        "startTime": "20180509192019",
        "liveType": "alone",
        "mp4":null
      },
      {
        "videoId": "752d0bd60f",
        "videoPoolId": "54df86edc489fb78f3fab89eb77094c4_5",
        "userId": "54df86edc4",
        "channelId": 100000,
        "title": "保利威视",
        "firstImage": "http://img.videocc.net//uimage/5/54df86edc4/4/54df86edc489fb78f3fab89eb77094c4_0.jpg",
        "duration": "00:00:37",
        "myBr": "1",
        "qid": null,
        "seed": 0,
        "ordertime": 0,
        "createdTime": 1525879207000,
        "lastModified": 1525879207000,
        "rank": 6,
        "asDefault": "N",
        "url": "http://mpv.videocc.net/54df86edc4/4/54df86edc489fb78f3fab89eb77094c4_1.m3u8",
        "channelSessionId": "f0t3g29fwb",
        "mergeInfo": null,
        "status": "Y",
        "fileUrl": "http://videolib.videocc.net/ec7paqepj320161102141026068/recordf.ec7paqepj320161102141026068_20180507155013.m3u8",
        "fileId": "c21fd49fae4f42a7b1c637be6ab749f1",
        "startTime": "20180507155013",
        "liveType": "ppt",
          "mp4":"http://videolib.videocc.net/ec7paqepj320161102141026068/recordf.ec7paqepj320161102141026068_20180507155013.mp4"
      },
      {
        "videoId": "4d8a9ec87f",
        "videoPoolId": "54df86edc45346b768f5437cb91844e8_5",
        "userId": "54df86edc4",
        "channelId": 100000,
        "title": "保利威视",
        "firstImage": "http://img.videocc.net//uimage/5/54df86edc4/8/54df86edc45346b768f5437cb91844e8_0.jpg",
        "duration": "00:00:42",
        "myBr": "1",
        "qid": null,
        "seed": 0,
        "ordertime": 0,
        "createdTime": 1525879189000,
        "lastModified": 1525879201000,
        "rank": 4,
        "asDefault": "N",
        "url": "http://mpv.videocc.net/54df86edc4/8/54df86edc45346b768f5437cb91844e8_1.m3u8",
        "channelSessionId": "f0gp7zunbp",
        "mergeInfo": null,
        "status": "Y",
        "fileUrl": "http://videolib.videocc.net/ec7paqepj320161102141026068/recordf.ec7paqepj320161102141026068_20180426140123.m3u8",
        "fileId": "424ecdd5d0689408f7531878b49a2c7d",
        "startTime": "20180426140123",
        "liveType": "alone"
         "mp4":"http://videolib.videocc.net/ec7paqepj320161102141026068/recordf.ec7paqepj320161102141026068_20180426140123.mp4"
      }
    ],
    "endRow": 3,
    "startRow": 1,
    "firstPage": true,
    "prePageNumber": 1,
    "totalPages": 1,
    "nextPageNumber": 1,
    "lastPage": true,
    "limit": 3,
    "offset": 0
  }
}

Field Description

Parameter Description
status Response status
data Response result
message Error message
pageNumber Video list page number (default 12 records per page)
totalItems Total number of playback videos
videoId ID generated by the live streaming system
videoPoolId VOD video VID
userId VOD backend user ID
channelId Live streaming channel ID corresponding to the playback video
title Video title
firstImage Video thumbnail
duration Video duration
myBr Default video playback quality, 1 for smooth, 2 for HD, 3 for Full HD
qid Visitor information collection ID
seed Video encryption status, 1 for encrypted, 0 for unencrypted
createdTime Date added as a playback video
lastModified Last modification date of the video
asDefault Whether it is the default playback video, value is Y/N
url Video playback URL. Note: If the video is encrypted, this URL will be inaccessible
channelSessionId Used for PPT data requests, related to PPT live streaming playback; value is null for normal live streaming playback
mergeInfo Video merge information, to be supplemented later
startTime Live streaming start time
mp4 MP4 corresponding to the transcoded playback video
lang Video language type: EN for English, zh_CN for Chinese
firstPage Whether it is the first page, value: true/false
lastPage Whether it is the last page, value: true/false
nextPageNumber Next page number
prePageNumber Previous page number
totalPages Total number of pages
startRow Position of the first video on the current page in the playback video list
endRow Position of the last video on the current page in the playback video list
limit Number of videos on the current page

PHP Request Example

<?php

//引用config.php
include 'config.php';

//接口需要的参数(非sign)赋值
$channelId = "127075";
$page = "1"; //页数
$pageSize="10";//每页显示的数据

$params = array(
    'appId'=>$appId,
    'channelId'=>$channelId,
    'page'=>$page,
    'pageSize'=>$pageSize,
    'timestamp'=>$timestamp
  );

//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法

//接口请求url
$url = "http://api.polyv.net/live/v3/channel/playback/special-list?appId=$appId"."&page=$page"."&pageSize=$pageSize"."&timestamp=$timestamp"."&sign=$sign"."&channelId=".$channelId;

//输出接口请求结果
echo file_get_contents($url);

?>
联系客服,在线咨询