跳到主要内容

获取直播频道的播放地址

服务地址

http://api-az-cn.danghongyun.com/rest

请求方法

GET

请求参数

参数说明类型是否必须
accessKey访问接口的accessKeyString必选
actionAPI名称,此接口为 "liveGetChannelsPlayUrl"String必选
versionAPI版本,目前必须为 2.0String必选
signature签名,请参考签名规则String必选
timestampAPI调用时间戳,1970年1月1日以来的毫秒数,如 1466488681033String必选
channelId直播频道ID,查询多个频道时,用逗号分隔String必选

响应示例

{
"code": 0,
"message": "operation success",
"result": [{
"channelId": "b29f64a6796f4268ab980c869587fbe5",
"channelGroupId": "67724a415cfa44c298945e891db4c2e8",
"channelGroupType": 1,
"playUrl": "http://p1u0enox.live1.danghongyun.local/live/hls/b29f64a6796f4268ab980c869587fbe5/67724a415cfa44c298945e891db4c2e8.m3u8",
"playUrlList": [{
"url": "http://p1u0enox.live1.danghongyun.local/live/hls/b29f64a6796f4268ab980c869587fbe5/67724a415cfa44c298945e891db4c2e8-2.m3u8",
"width": 640,
"height": 352,
"videoBitrate": 270,
"audioBitrate": 64,
"defaultVideo": "1"
},
{
"url": "http://p1u0enox.live1.danghongyun.local/live/hls/b29f64a6796f4268ab980c869587fbe5/67724a415cfa44c298945e891db4c2e8-1.m3u8",
"width": 720,
"height": 576,
"videoBitrate": 450,
"audioBitrate": 64,
"defaultVideo": "0"
}]
},
{
"channelId": "b29f64a6796f4268ab980c869587fbe5",
"channelGroupId": "f1fdabf94e2e4653baccfc423a9cdca7",
"channelGroupType": 2,
"playUrl": "rtmp://172.17.230.223/live/p1u0enox_f1fdabf94e2e4653baccfc423a9cdca7",
"playUrlList": [{
"url": "rtmp://172.17.230.223/live/p1u0enox_f1fdabf94e2e4653baccfc423a9cdca7",
"width": 640,
"height": 352,
"videoBitrate": 270,
"audioBitrate": 64,
"defaultVideo": "1"
}]
}],
"success": true
}

响应字段说明

频道播放列表

字段说明
channelId直播频道Id
channelGroupId输出组Id
channelGroupType输出组协议类型 1.hls 2.rtmp
playUrl父级播放地址
playUrlList子级播放信息列表,参见流播放信息

流播放信息

字段说明
url子级播放地址
width视频宽
height视频高
videoBitrate视频码率
audioBitrate音频码率
defaultVideo是否默认 0.否 1.是