bindDeviceLive: Create device source live broadcast address
bindDeviceLive: Create device source live broadcast address
Function details
Create device source live broadcast address. Important: After the live broadcast address is made public, others can directly view the camera video footage. Please take good care of your live broadcast address.
- The live broadcast address will be deleted automatically when the device is unbound;
- When the device channel creates a live broadcast, it will create HD main stream, SD secondary stream, HTTP, HTTPS4 types of live broadcast addresses by default in the background, this interface will only return the live broadcast address of the currently selected code stream HTTP protocol;
- You can find all live broadcast addresses through the getLiveStreamInfo interface or in the developer console interface.
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/bindDeviceLive
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator accessToken | ||
| deviceId | String | Yes | Device serial number | ||
| channelId | String | Yes | Channel ID | ||
| streamId | Integer | Yes | Stream type, 0: HD main stream; 1: SD auxiliary stream | ||
| liveMode | String | No | Live stream type "proxy" This parameter can be left blank, or fixed "proxy" |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"58386675a58cf164d64c1944fd33a516",
"time":1603366491,
"nonce":"7aed0429-1a92-4a51-b8b0-cfebb60dcc85"
},
"id":"a25f887f-33f0-44ef-9ed3-f60f83193482",
"params":{
"streamId":1,
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"token":"At_00000ad9e6e87f0142eb92e207aec46a"
}
}
####Return data field description
| Field name | Field type | Field description | |
|---|---|---|---|
| liveToken | String | Live broadcast authorization token | |
| liveStatus | Integer | Live broadcast status (1: open; 2: pause; 3: insufficient traffic) | |
| liveType | Integer | Type of live source (1: device; 2: stream address) | |
| deviceId | String | Device serial number | |
| channelId | String | Channel number | |
| coverUpdate | Integer | Video cover update frequency (unit: s) | |
| streams | hls | String | Live stream hls access address |
| coverUrl | String | Video cover image link url | |
| streamId | Integer | Stream type (0: HD main stream; 1: SD secondary stream) (when the live broadcast address is generated by the rtsp source, this field is not available) | |
| job | status | Boolean | Live broadcast plan status (true: on; false: off) |
| period | String | Duty cycle | |
Sample output
{
"result":{
"msg":"The operation was successful.",
"code":"0",
"data":{
"liveType":1,
"coverUpdate":90,
"streams":[
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.jpg",
"streamId":1,
"hls":"http://cmgw-vpc.lechange.com:8888/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8"
}
],
"liveToken":"57877dd6774f4cbeb657568be0b7a621",
"job":[
{
"period":"always",
"status":true
}
],
"deviceId":"TESTQWERXXXX",
"liveStatus":1,
"channelId":"0"
}
},
"id":"a25f887f-33f0-44ef-9ed3-f60f83193482"
}
