直播能力更新

2022-07-07
暂无评分

直播能力更新-live_capacity

live_capacity这个字段是放在网关设备的物模型中的,同时推送的属性为当设备端有状态变化时才推送。

通信方式: MQTT

API接口:

PUB/SUB Topic: thing/product/#{pid}/state

参数说明:

  • {pid}:指网关设备的产品ID,一般是用设备的SN号来表示,每台设备都不一样,所以需要服务端订阅Topic的时候用通配符来表示。

  • 该条topic会同时发送多个不同字段的数据,其中live_capacity payload段具体的示例如下,详细的字段描述见上面的变量解释:

示例代码块

{
  "bid": "3db58aed-d6c4-4790-99b8-24cc5b9673ff",
  "data": {
    "live_capacity": {
      "available_video_number": 2,
      "coexist_video_number_max": 1,
      "device_list": [
        {
          "available_video_number": 2,
          "camera_list": [
            {
              "available_video_number": 1,
              "camera_index": "42-0-0",		// 产品枚举值,type-subtype-gimbalIndex
              "coexist_video_number_max": 1,
              "video_list": [
                {
                  "video_index": "zoom-0",
                  "video_type": "zoom"
                },
                {
                  "video_index": "wide-0",
                  "video_type": "wide"
                }
              ]
            },
            {
              "available_video_number": 1,
              "camera_index": "39-0-7",
              "coexist_video_number_max": 1,
              "video_list": [
                {
                  "video_index": "normal-0",
                  "video_type": "normal"
                }
              ]
            }
          ],
          "coexist_video_number_max": 0,
          "sn": "1ZNDH1D0010054"
        }
      ]
    }
  },
  "tid": "de3b71b3-658a-4e2c-bcb2-adf1511eaa55",
  "timestamp": 1638793080938,
  "gateway": "1ZMDGBW0000135"
}