1.接口描述
接口Live_Channel_GetLiveChannelList:查询频道列表。
地址
API 调用地址为:
http://fcgi.video.qcloud.com/common_access
。用途
在直播码模式下,用于查询直播中频道列表。
2.输入参数
参数名 | 参数含义 | 类型 | 备注 | 是否必需 |
appid | 客户 ID | int | 即直播 appid,用于区分不同客户的身份,账户信息中获取 | Y |
interface | 接口名 | string | Live_Channel_GetLiveChannelList | Y |
t | 有效截止时间戳 | int | - | Y |
sign | 签名 | string | md5(key+ 有效截止时间戳) | Y |
3.输出结果
参数名 | 参数含义 | 类型 | 备注 |
ret | 返回码 | int | 0:成功;其他值:失败 |
message | 错误信息 | string | 错误描述 |
output | 消息内容 | array | - |
其中 output 部分结构为:
字段名 | 含义 | 类型 | 备注 |
all_count | 总个数 | int | - |
channel_list | 列表 | array | - |
其中 channel_list 部分结构为:
参数名 | 参数含义 | 类型 | 备注 |
channel_id | 直播码 ID | string | - |
4.调用示例
目标:查询该账号下直播中频道列表。
组成部分 | 示例内容 |
接口 URL | http://fcgi.video.qcloud.com/common_access? |
// copy时请去掉美化排版用的不可见换行符,否则可能出现 “appid is invalid” 等url拼装错误URL = http://fcgi.video.qcloud.com/common_access?appid=1234&interface=Live_Channel_GetLiveChannelList&t=1471850187&sign=b17971b51ba0fe5916ddcd96692e9fb3