Getting Started
Official Site
Getting Started
Official Site
  • Document description
  • Read before you start

  • Light application development guide

  • Mobile application development guide

  • Cloud live development guide

  • Desktop application development guide

  • Third party development guide

  • Message push development guide

  • IoT things data model

  • HTTP interface

    • Development specification
    • API privacy policy
    • Postman interface simulation call
    • accessToken: Get administrator token
    • API request example
    • Account docking
    • Push configuration
    • Cloud storage service
    • Equipment management

    • Device configurat

    • Video equipment

    • Device message
    • Device live broadcast
      • bindDeviceLive: Create device source live address
      • unbindLive: Delete the live broadcast address
      • liveList: Get Live List
      • queryLiveStatus: Get live broadcast status
      • modifyLivePlanStatus: Set the live broadcast plan switch
      • modifyLivePlan: Modify Live Plan Time
      • batchModifyLivePlan: Batch modify live plan time
      • getLiveStreamInfo: Get the live broadcast address and live broadcast status according to the serial number
      • createDeviceRtmpLive: Create rtmp protocol live address
      • deleteDeviceRtmpLive: Delete the rtmp protocol live address
      • queryDeviceRtmpLive: Query the rtmp protocol live address
    • Device lock access
  • Reference documents

On this page
Function details
Request address
Incoming parameter description
Sample input
Return data field description
Sample output

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 nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesAdministrator accessToken
deviceIdStringYesDevice serial number
channelIdStringYesChannel 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"
}
batchModifyLivePlan: Batch modify live plan time
createDeviceRtmpLive: Create rtmp protocol live address