getLiveStreamInfo: Query live broadcast information created under the device channel
getLiveStreamInfo: Query live broadcast information created under the device channel
Function details
Obtain the live broadcast address and live broadcast status according to the device serial number and channel number.
Remarks:
You need to create a live broadcast address through bindDeviceLive first, otherwise the live broadcast information cannot be obtained.
Four types of live broadcast addresses can be obtained: HD main stream, SD sub stream, HTTP, and HTTPS.
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/getLiveStreamInfo
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 |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"469e57e01dcbd786f961d79bc231dd52",
"time":1603366946,
"nonce":"2e84717c-0f22-4424-8afe-19bab0d6d606"
},
"id":"051824b1-9655-4755-9cc2-adcc9ab5fef1",
"params":{
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"token":"At_00000ad9e6e87f0142eb92e207aec46a"
}
}
Return data field description
| Field name | Field type | Field description | |
|---|---|---|---|
| streams | hls | String | Live stream hls access address |
| 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) | |
| status | String | Status | |
| liveToken | String | token for live broadcast | |
Sample output
{
"result":{
"msg":"The operation was successful.",
"code":"0",
"data":{
"streams":[
{
"streamId":1,
"liveToken":"57877dd6774f4cbeb657568be0b7a621",
"hls":"http://cmgw-vpc.lechange.com:8888/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8",
"status":"0"
},
{
"streamId":0,
"liveToken":"57877dd6774f4cbeb657568be0b7a621",
"hls":"http://cmgw-vpc.lechange.com:8888/LCO/TESTQWERXXXX/0/0/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8",
"status":"0"
},
{
"streamId":1,
"liveToken":"57877dd6774f4cbeb657568be0b7a621",
"hls":"https://cmgw-vpc.lechange.com:8890/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8?proto=https",
"status":"0"
},
{
"streamId":0,
"liveToken":"57877dd6774f4cbeb657568be0b7a621",
"hls":"https://cmgw-vpc.lechange.com:8890/LCO/TESTQWERXXXX/0/0/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8?proto=https",
"status":"0"
}
]
}
},
"id":"051824b1-9655-4755-9cc2-adcc9ab5fef1"
}
