接口定义
|
接口描述 |
获取推流地址信息 |
|
接口地址 |
/svc/api3/live/<channel_web_id>/publish |
|
接口协议 |
HTTP POST |
|
HTTP HEADER |
Authorization=<authorization> version=<version> |
请求参数
|
名称 |
说明 |
数据类型 |
最大长度 |
可空 |
|
channel_web_id |
视频webid |
String |
100 |
否 |
|
coded |
是否编码 |
String |
8 |
是 |
请求示例
POST /svc/api3/live/<channel_web_id>/publish HTTP/1.1
Host: svc.suning.com
Content-Type: application/json
Authorization: <authorization>
version: <version>
{ "code": "true" }
响应内容
|
名称 |
数据类型 |
说明 |
|
name |
String |
流名称 |
|
path |
String |
推流方式(push,publish) |
|
protocol |
String |
协议 |
|
args |
String |
参数 |
|
channelid |
Integer |
频道id |
|
now |
Integer |
当前时间戳 |
|
addr |
String |
收流地址 |
|
isTurnOn |
Integer |
logo是否显示 |
|
url |
String |
logo链接 |
|
align |
String |
logo位置 |
|
diaphaneity |
Integer |
透明度 |
|
ax |
String |
ax |
|
ay |
String |
ay |
|
width |
String |
width |
|
publishCode |
String |
推流码 |
响应示例
{
"data": {
"name": "61f8f4cd2e4b4e72aebbdc02e0215ef5?ts=1781868478&token=4e4d6c15c9289310387d9aa105970892",
"path": "/push",
"protocol": "rtmp",
"args": [],
"channelid": 156590026,
"now": 1466508478369,
"addr": [
"player.suning.com"
],
"logo": {
"isTurnOn": 1,
"url": "http://grocery.pptv.com/lpic/ea7/a31/013/de8660322896b27530d31d82a0aa7bd0.jpg",
"align": "lefttop",
"diaphaneity": 100,
"ax": "0.0156",
"ay": "0.0277",
"width": "0.13"
}
},
"err": 0,
"msg": "success"
}
推流地址示例:
rtmp://118.123.212.91:1936/push/61f8f4cd2e4b4e72aebbdc02e0215ef5?ts=1781868478&token=4e4d6c15c9289310387d9aa105970892
推流地址拼接逻辑参考 推流地址拼接逻辑说明
