简要描述:
- 获取直播室协议推流和观看地址
请求URL:
- /zhibo/rooms/{roomId}/protocalurls
HTTP请求方法:
- GET
请求头:
NA
URL请求参数:
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
roomId | String | 是 | 直播间主键pid |
请求体参数:
NA
返回参数说明:
返回200的成功的响应体:
参数名 | 类型 | 说明 |
---|---|---|
appPushProtocal | String | App推流协议URL |
appPullProtocal | String | App观看协议URL |
webPullProtocal | String | Web观看协议URL |
webAssistPullProtocal | String | 助教Web观看协议URL |
appPushProtocalHash | String | App推流协议URL(含加密密码) |
appPullProtocalHash | String | App观看协议URL(含加密密码) |
webPullProtocalHash | String | Web观看协议URL(含加密密码) |
webAssistPullProtocalHash | String | 助教Web观看协议URL(含加密密码) |
示例:
请求:
GET https://api-zhibo.yxt.com/v1/zhibo/rooms/fe04ddc7-3628-4740-8db7-a504f3719bf3/protocalurls
Content-Type: application/json;charset=UTF-8
appkey: xxxxxxxxxxxxxxxxxxxxx
nonce: xxxx
timestamp: xxxxxxxxxx
signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
source: xxxx
请求体:
NA
正确时返回:
状态值: HTTP/1.1 200 OK.
Content-Type: application/json;charset=UTF-8
{
"appPushProtocal": "https://view.ljlive.cn/apps/play/#/start?roomId=5mjdFgoMAc6",
"appPullProtocal": "https://view.ljlive.cn/apps/play/#/join?roomId=5mjdFgoMAc6",
"webPullProtocal": "https://view.ljlive.cn/apps/play/#/init?roomId=5mjdFgoMAc6",
"webAssistPullProtocal": "https://view.ljlive.cn/apps/play/#/init?roomId=5mjdFgoMAc6&at=1",
"appPushProtocalHash": "https://view.ljlive.cn/apps/play/#/start?roomId=5mjdFgoMAc6&pwd=49ba59abbe56e057",
"appPullProtocalHash": "https://view.ljlive.cn/apps/play/#/join?roomId=5mjdFgoMAc6",
"webPullProtocalHash": "https://view.ljlive.cn/apps/play/#/init?roomId=5mjdFgoMAc6",
"webAssistPullProtocalHash": "https://view.ljlive.cn/apps/play/#/init?roomId=5mjdFgoMAc6&at=1"
}
错误时返回:
状态值: HTTP/1.1 400 Bad Request
{
"error": {
"key": "global.noprivilege",
"message": "No privilege."
}
}
错误代码列表:
格式: key=状态码;message
apis.auth.client.status.invalid=400;Client Org status is invalid.
apis.zhibo.orgadmin.validation.service.expired=400;Service is not active.