观看时间消息格式

使用streamUuid字段,可以区分观看次数。一次观看开始和观看结束的消息中,streamUuid相同。

消息格式

名称 类型 是否必须 备注
messageType String 事件类型=view_time_message
alarmTime String 报警时间,RFC3339格式
messageData Object 消息内容(详情见下表)

messageData内容如下:

名称 类型 是否必须 备注
deviceSn String 设备序列号
channelId int 通道ID
prototypeType String 协议字段
streamType int 码流Id 0为主码流 非0值为次码流
playType String 观看类型 view_start:观看开始 view_end:观看结束
streamUuid String 流UUID(字母,数字,下划线),最长 42 位
eventTime String 观看时间
extensions String 协议拓展字段, 传递用户自定义参数, 参数值为获取实况预览播放地址, 获取实时预览播放地址_标准协议 接口对应字段传入
//示例数据
{
    "messageType":"view_time_message",
    "alarmUuid":"1680575535061200077",
    "alarmTime":"2023-04-12T17:05:00+08:00",
    "messageData":{
        "deviceSn":"1222DSSSHABS",
        "channelId":0,
        "prototypeType":"mts",
        "streamType":0,
        "playType":"view_start",
        "streamUuid":"1r20g3kamml7l_89005707420230412094614",
        "eventTime":"2023-04-12T17:05:00+08:00",
        "extensions":"e4e36ab460f24e64af6c13747794d094"
    }
}

results matching ""

    No results matching ""