获取频道回放列表

接口URL

http://api.polyv.net/live/v2/channel/recordFile/{channelId}/playback/list

接口说明

1、作用:获取回放视频的视频列表信息。
2、接口支持https协议
3、接口URL中的{channelId}为 频道ID

支持格式

JSON

请求方式

GET

请求数限制

TRUE

请求参数

参数名 必选 类型 说明
appId string 从API设置中获取,在直播系统登记的appId
timestamp string 当前13位毫秒级时间戳,3分钟内有效
page string 页数,默认每页显示12条数据
pageSize string 每页显示的数据条数
sign string 签名,32位大写MD5值

响应成功JSON示例:

{
  "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"
      },
      {
        "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"
      },
      {
        "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"
      }
    ],
    "endRow": 3,
    "startRow": 1,
    "firstPage": true,
    "prePageNumber": 1,
    "totalPages": 1,
    "nextPageNumber": 1,
    "lastPage": true,
    "limit": 3,
    "offset": 0
  }
}

字段说明

参数名 说明
status 响应状态
data 响应结果
message 异常错误信息
pageNumber 视频列表页数(默认以12条数据为1页)
totalItems 回放视频总个数
videoId 直播系统生成的id
videoPoolId 点播视频vid
userId 点播后台用户id
channelId 回放视频对应的直播频道id
title 视频标题
firstImage 视频首图
duration 视频长度
myBr 默认视频的播放清晰度,1为流畅,2为高清,3为超清
qid 访客信息收集id
seed 视频加密状态,1表示为加密状态,0为非加密
createdTime 添加为回放视频的日期
lastModified 视频最后修改日期
asDefault 是否为默认播放视频,值为Y/N
url 视频播放地址,注:如果视频为加密视频,则此地址无法访问
channelSessionId 用于PPT请求数据,与PPT直播的回放相关,普通直播回放值为null
mergeInfo 视频合并信息,后续补充
startTime 直播开始时间
firstPage 是否为第一页,值为:true/false
lastPage 是否为最后一页,值为:true/false
nextPageNumber 下一页编号
prePageNumber 上一页编号
totalPages 总页数
startRow 当前页第一个视频在回放视频中的位置
endRow 当前页最后一个视频在回放视频中的位置
limit 当前页视频个数

php请求示例

<?php

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

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

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

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

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

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

?>

签名规则(config.php文件代码查看)

http://dev.polyv.net/2018/liveproduct/l-api/rule/sign/

以上内容是否对您有帮助?根本没有帮助文档较差文档一般文档不错文档很好
Loading...