Commit 77ff3dd20699f0fb09db2e1951a0d93453c5fcee
1 parent
8c72eb46
定义接口
Showing
1 changed file
with
22 additions
and
6 deletions
02.直播云/2.1 获取推流直播播放地址.md
| 1 | -### socket接收心跳接口 | |
| 1 | +### 获取推流直播播放地址(ugc) | |
| 2 | 2 | ----- |
| 3 | -#### IP: bc.cnlive.com | |
| 3 | +#### http://api.cnlive.com/open/api2/live_epg/play | |
| 4 | 4 | ----- |
| 5 | -#### 接口说明: 直播心跳接口;在推流启动后建立连接,每隔30s向socket服务端发送一个字符串消息,推流结束关闭连接。 | |
| 5 | +#### 接口说明: | |
| 6 | + | |
| 6 | 7 | ----- |
| 7 | -#### 请求方式: socket | |
| 8 | +#### 请求方式: HTTP GET | |
| 8 | 9 | ----- |
| 9 | -#### 返回格式: 无 | |
| 10 | +#### 返回格式: 200 | |
| 10 | 11 | ----- |
| 11 | 12 | #### 请求参数说明: |
| 12 | 13 | | 参数名 | 参数类型 | 必选 | 参数说明 | |
| 13 | 14 | | :----------- | :------: | :------: | :------: | |
| 14 | -| appId#activityId | string | true | 组合ID | | |
| 15 | 15 | \ No newline at end of file |
| 16 | +| appId | string | true | 应用ID | | |
| 17 | +| activityId| string | true | 活动ID,确保SP下的唯一性 | | |
| 18 | +| sign | String | true | 签名规则见<a href="http://help.open.cnlive.com/common.html">签名详情</a> | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | +#### 返回结果 json | |
| 23 | +```json | |
| 24 | + { | |
| 25 | + "errorMessage":"成功", | |
| 26 | + "data":{ | |
| 27 | + "location":"rtmp://wsrtmp4.live.cnlive.com/cdn/xinyingshi?wsSecret=f10722a1a2ffd198772b2ac8cf1c0afb&wsTime=57a3f066" | |
| 28 | + }, | |
| 29 | + "errorCode":"0" | |
| 30 | + } | |
| 31 | +``` | |
| 16 | 32 | \ No newline at end of file | ... | ... |