liveList (liveList: Get live broadcast list)
liveList: liveList: Get live broadcast list
Function details
Get the live broadcast details list created under the developer's current account, including the live broadcast address, live broadcast status, and live broadcast schedule.
Note: You need to create a live broadcast address through [bindDeviceLive] (bindDeviceLive.md) first, otherwise the live broadcast information cannot be obtained.
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/liveList
Request format
HTTP POST. JSON body layout: Request conventions. Sign with Signature.
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator accessToken | ||
| queryRange | String | Yes | Query Range The number value range is: [1, N] (N is a positive integer, and N>1); the difference range is: [0,99] |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time":1603367402,
"nonce":"10ba3958-b861-4284-acfe-28cf5f3955dd"
},
"id":"1cd43fdb-810b-44f4-8652-9d232dd95f1b",
"params":{
"token":"At_00000ad9e6e87f0142eb92e207aec46a",
"queryRange":"1-10"
}
}
Return data field description
| Field | Type | Description |
|---|---|---|
| count | Integer | Number of items in thelivesarray in this response (after filtering), not the total live count for the account |
| lives.liveToken | String | Live token |
| lives.liveStatus | Integer | Live broadcast status (1: open; 2: pause; 3: insufficient traffic) |
| lives.liveType | Integer | Type of live source (1: device; 2: stream address) |
| lives.deviceId | String | [Optional] Device serial number |
| lives.channelId | Integer | Channel number |
| lives.coverUpdate | Integer | Video cover update frequency (unit: s) |
| lives.streams.hls | String | Live stream hls access address |
| lives.streams.coverUrl | String | Video cover url |
| lives.streams.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) |
| lives.job.status | Boolean | Live broadcast plan status (true: on; false: off) |
| lives.job.period | String | Duty cycle |
| lives.job.beginTime | String | Start time |
| lives.job.endTime | String | End time |
Sample output
{
"result":{
"msg":"The operation was successful.",
"code":"0",
"data":{
"lives":[
{
"liveType":2,
"coverUpdate":90,
"streams":[
{
"coverUrl":"http://alhlscdn.lechange.com/LCO/3f35d2d41758dc707e614c2999f8b922/20190429155036/stream_20190429155036_71e53mz34pcaprgb.jpg",
"hls":"http://alhlsgw.lechange.com:9001/LCO/3f35d2d41758dc707e614c2999f8b922/20190429155036/stream_20190429155036_71e53mz34pcaprgb.m3u8"
}
],
"liveToken":"stream_20190429155036_71e53mz34pcaprgb",
"job":[
{
"period":"always",
"status":true
}
],
"liveStatus":1
},
{
"liveType":2,
"coverUpdate":90,
"streams":[
{
"coverUrl":"http://alhlscdn.lechange.com/LCO/aaf71e228f1da90232c0ac87803ce4b6/20191023171615/stream_20191023171615_qahzm4ml2bk93l72.jpg",
"hls":"http://alhlsgw.lechange.com:9001/LCO/aaf71e228f1da90232c0ac87803ce4b6/20191023171615/stream_20191023171615_qahzm4ml2bk93l72.m3u8"
}
],
"liveToken":"stream_20191023171615_qahzm4ml2bk93l72",
"job":[
{
"period":"always",
"status":true
}
],
"liveStatus":1
},
{
"liveType":1,
"coverUpdate":90,
"streams":[
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/0/20200907T032254/dev_TESTQWERXXXX_20200907T032254.jpg",
"streamId":0,
"hls":"https://cmgw-vpc.lechange.com:8890/LCO/TESTQWERXXXX/0/0/20200907T032254/dev_TESTQWERXXXX_20200907T032254.m3u8?proto=https"
},
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/0/20200907T032254/dev_TESTQWERXXXX_20200907T032254.jpg",
"streamId":1,
"hls":"https://cmgw-vpc.lechange.com:8890/LCO/TESTQWERXXXX/0/1/20200907T032254/dev_TESTQWERXXXX_20200907T032254.m3u8?proto=https"
},
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/0/20200907T032254/dev_TESTQWERXXXX_20200907T032254.jpg",
"streamId":0,
"hls":"http://cmgw-vpc.lechange.com:8888/LCO/TESTQWERXXXX/0/0/20200907T032254/dev_TESTQWERXXXX_20200907T032254.m3u8"
},
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/0/20200907T032254/dev_TESTQWERXXXX_20200907T032254.jpg",
"streamId":1,
"hls":"http://cmgw-vpc.lechange.com:8888/LCO/TESTQWERXXXX/0/1/20200907T032254/dev_TESTQWERXXXX_20200907T032254.m3u8"
}
],
"liveToken":"63813c4aa4b442069748437c1bd0b749",
"job":[
{
"period":"always",
"status":true
}
],
"deviceId":"TESTQWERXXXX",
"liveStatus":1,
"channelId":"0"
},
{
"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"
},
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.jpg",
"streamId":0,
"hls":"http://cmgw-vpc.lechange.com:8888/LCO/TESTQWERXXXX/0/0/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8"
},
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.jpg",
"streamId":1,
"hls":"https://cmgw-vpc.lechange.com:8890/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8?proto=https"
},
{
"coverUrl":"http://livecloudpic.lechange.com/LCO/TESTQWERXXXX/0/1/20201022T113914/dev_TESTQWERXXXX_20201022T113914.jpg",
"streamId":0,
"hls":"https://cmgw-vpc.lechange.com:8890/LCO/TESTQWERXXXX/0/0/20201022T113914/dev_TESTQWERXXXX_20201022T113914.m3u8?proto=https"
}
],
"liveToken":"57877dd6774f4cbeb657568be0b7a621",
"job":[
{
"period":"always",
"status":true
}
],
"deviceId":"TESTQWERXXXX",
"liveStatus":1,
"channelId":"0"
}
],
"count":4
}
},
"id":"1cd43fdb-810b-44f4-8652-9d232dd95f1b"
}
Error codes
This method may return the codes below. See Return codes and Capability errors for the full catalog.
Gateway and auth (SN / TK / OP)
| Code | Meaning | Next step |
|---|---|---|
SN1001 | Signature error | Check sign per Development specification |
TK1002 | Token invalid or expired | Refresh accessToken |
OP1002 | Missing required parameter | Add required fields |
OP1003 | Invalid parameter | Match this page’s parameter table |
OP1009 | Permission denied | Check token and device bind/share grants |
OP1013 | Total call limit exceeded | Reduce call rate |
OP1014 | Daily per-interface limit exceeded | See Interface call limits |
DV1007 | Device offline | Wait until the device is online |
See Return codes · OP/SN/TK for the full catalog.
Sub-accounts (SUB)
| Code | Meaning | Next step |
|---|---|---|
SUB1001–SUB1002 | Sub-account lacks API permission | Update policy via addPolicy |
SUB1005 | Sub-account token expired | Refresh subAccountToken |
SUB1006 | No device grant for sub-account | Check Resource and device serial |
SUB1008 | Sub-account not bound to app | Create and bind the sub-account first |
See Return codes · SUB.
Device access and channels (DV10xx)
| Code | Meaning | Next step |
|---|---|---|
DV1007 | Device offline or timeout | Wait for the device to come online |
DV1009 | Device busy | Retry later |
DV1012 | Insufficient share/grant permission | Check sub-account Permission / Resource |
DV1019 | Capability not supported | Confirm model and capability list |
DV1020 | Channel offline | Check channel status |
DV1026 | Function not supported | Use another API or upgrade firmware |
DV1028 | Not bound or channel missing | Verify deviceId / channelId |
See Return codes · DV.
Live binding (LV)
| Code | Meaning | Next step |
|---|---|---|
LV1001 | Live already exists | Unbind via unbindLive or use another source |
| :--- | :--- | :--- |
LV1002 | Live does not exist | Create the live plan first |
| :--- | :--- | :--- |
LV1005 | Live info does not exist | Verify live id |
| :--- | :--- | :--- |
LV1006 | Same RTSP source can bind only once per day | Retry the next day |
| :--- | :--- | :--- |
LV1008 | Real-name verification required | Complete profile in the Open Platform console |
| :--- | :--- | :--- |
LV1020 | Live is bound and cannot be deleted | Unbind first |
| :--- | :--- | :--- |
OP1021 | Failed to get playback URL | Check live status and plan |
| :--- | :--- | :--- |
OP1022 | Cloud decode authorization required | Authorize in the app as described in the response |
