接口名称 flash直播播放器EPG信息     web domain
地址 https://api.cnlive.com/open/api2/live_epg/flash/getChannelInfo4Player
method get
返回数据 json

/* Title: 1.01 播放器获取直播信息接口 swf */

接口描述

接口地址

http://api.cnlive.com/open/api2/live_epg/flash/getChannelInfo4Player

接口协议

HTTP GET

接口请求参数

参数名 参数类型 必选 参数说明
appId string true 应用ID
channelId string true 直播频道(主播)ID
activityId string false 直播活动ID(活动ID channelId 至少有一个)
uid string false 用户标识(uuid_时间戳)
sid String false 用户ID
retry int false 重试次数,在0~4之间累加
isHLS int false 0:rtmp流,1:hls流(默认0)

返回值

参数名 参数类型 必选 参数说明
errorCode int true 错误类型号
errorMessage string true 错误信息
title string true 活动名称
channelId string true 直播频道(主播)ID
activityId string false 活动ID
liveStatus int true 0:直播前;1:直播中;2:直播结束;3:回放准备中;4:回放;5:直播下线;-2:直播异常
statusDescription string true 状态描述(前端可以自定义)
videoUrl_1 string false 播放地址 流畅版
videoUrl_2 string true 播放地址 清晰版
videoUrl_3 string false 播放地址 高清版
videoUrl_4 string false 播放地址 超清版
cover string false 封面图地址

返回JSON格式的节目元数据信息,json示例如下:

{
 "errorMessage":"请求成功",
 "data":{
 "channelId":"*********",
 "title":"BTOB甜喊:我想你们了",
 "videoUrl_1":"*****",
 "videoUrl_2":"*****",
 "videoUrl_3":"*****",
 "videoUrl_4":"*****",
 "liveStatus":2,
 "statusDescription":"直播已结束",
 "cover":"*****"
 },
 "errorCode":"0"
}