设置频道回放设置

接口URL

http://api.1588go.com/live/v3/channel/playback/set-setting

接口说明

1、接口用于设置回放设置
2、接口支持https

支持格式

JSON

请求方式

POST

请求数限制

TRUE

请求参数

参数名 必选 类型 说明
appId string 从API设置中获取,在直播系统登记的appId
timestamp long 13位当前时间戳
sign string 签名值
channelId string 频道号
playbackEnabled string 回放开关,Y-开启,N-关闭
type string 回放方式,single-单个回放,list-列表回放
origin string 回放来源,record-暂存,playback-回放列表,vod-点播列表
videoId string 单个回放的视频id

响应成功JSON示例:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": true
}

响应字段说明

参数名 说明
code 状态码,成功为200,签名失败为403,参数错误为400,服务端错误为500
status 成功为success,错误时为error
message 成功为"",错误时为错误描述信息
data 成功时为true,错误时为""

响应失败JSON示例:

参数错误

{
    "code": 400,
    "status": "error",
    "message": "param validate error",
    "data": 400
}

未输入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正确

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

时间戳错误

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

签名错误

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

三分屏不支持点播列表

{
    "code": 400,
    "status": "error",
    "message": "scene operation limited",
    "data": ""
}

三分屏操作点播列表

{
    "code": 400,
    "status": "error",
    "message": "scene operation limited",
    "data": ""
}

暂存不支持列表

{
    "code": 400,
    "status": "error",
    "message": "unsupported record list",
    "data": ""
}

php请求示例

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

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' =>  195770,
  'playbackEnabled' => 'Y',
  'type' => 'list',
  'origin' => 'playback'
);

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

$url = "http://api.1588go.com/live/v3/channel/playback/set-setting?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

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

http://dev.1588go.com/2018/liveproduct/l-api/rule/sign/

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