getLiveStreamInfo:查询设备通道下创建的直播信息

功能详情

根据设备序列号和通道号获取直播地址和直播状态。

备注:

需先通过bindDeviceLive创建直播地址,否则无法获取直播信息。

可以获取到高清主码流、标清辅码流、HTTP、HTTPS四类直播地址。

请求地址

https://openapi.lechange.cn/openapi/getLiveStreamInfo

传入参数说明

参数名 参数类型 是否必填 默认值 合法值 参数说明
token String 管理员accessToken
deviceId String 设备序列号
channelId String 通道号

样例输入

{
    "system":{
        "ver":"1.0",
        "appId":"lcd08b4b07ce224508",
        "sign":"469e57e01dcbd786f961d79bc231dd52",
        "time":1603366946,
        "nonce":"2e84717c-0f22-4424-8afe-19bab0d6d606"
    },
    "id":"051824b1-9655-4755-9cc2-adcc9ab5fef1",
    "params":{
        "deviceId":"MEGREZ0000001842",
        "channelId":"0",
        "token":"At_00000ad9e6e87f0142eb92e207aec46a"
    }
}

返回data字段说明

字段名 字段类型 字段说明
streams hls String 直播流hls访问地址
streamId Integer 码流类型(0:高清主码流;1:标清辅码流)(当直播地址由rtsp源生成时,无该字段)
status String 状态
liveToken String 直播的token

样例输出

{
    "result":{
        "msg":"操作成功。",
        "code":"0",
        "data":{
            "streams":[
                {
                    "streamId":1,
                    "liveToken":"57877dd6774f4cbeb657568be0b7a621",
                    "hls":"http://cmgw-vpc.lechange.com:8888/LCO/MEGREZ0000001842/0/1/20201022T113914/dev_MEGREZ0000001842_20201022T113914.m3u8",
                    "status":"0"
                },
                {
                    "streamId":0,
                    "liveToken":"57877dd6774f4cbeb657568be0b7a621",
                    "hls":"http://cmgw-vpc.lechange.com:8888/LCO/MEGREZ0000001842/0/0/20201022T113914/dev_MEGREZ0000001842_20201022T113914.m3u8",
                    "status":"0"
                },
                {
                    "streamId":1,
                    "liveToken":"57877dd6774f4cbeb657568be0b7a621",
                    "hls":"https://cmgw-vpc.lechange.com:8890/LCO/MEGREZ0000001842/0/1/20201022T113914/dev_MEGREZ0000001842_20201022T113914.m3u8?proto=https",
                    "status":"0"
                },
                {
                    "streamId":0,
                    "liveToken":"57877dd6774f4cbeb657568be0b7a621",
                    "hls":"https://cmgw-vpc.lechange.com:8890/LCO/MEGREZ0000001842/0/0/20201022T113914/dev_MEGREZ0000001842_20201022T113914.m3u8?proto=https",
                    "status":"0"
                }
            ]
        }
    },
    "id":"051824b1-9655-4755-9cc2-adcc9ab5fef1"
}

results matching ""

    No results matching ""