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
Sample output

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.

  1. The live broadcast address will be deleted automatically when the device is unbound;
  2. 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;
  3. 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 nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesAdministrator accessToken
deviceIdStringYesDevice serial number
channelIdStringYesChannel ID
streamIdIntegerYesStream type, 0: HD main stream; 1: SD auxiliary stream
liveModeStringNoLive 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"
}
getAlarmMessage: Query user alarm information
unbindLive: Delete the live broadcast address