💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 流媒体 `getStream` `death` `active` ### 发布Topic:v1.1/client/<customer_id>/media/post | 指令集| 描述 | | --- | --- | | getStream| 获取视频流地址| | death| 停止播放| | active| 活跃信号 30s发送一次| | 名称 | 类型 | 描述 | | --- | --- | --- | | mid | String | 会话ID | | timestamp| String | 时间戳 | | token| String | 用户token | | command| String | 指令 | | params| Object | 参数 | #### params结构体 | 名称 | 类型 | 描述 | | --- | --- | --- | | netId| String | 网关ID | | channel| Number | 通道号 | | stream_type| String | main<主码流>/sub<子码流,默认> | | video_type| String | hls<视频m3u8> /flv <flv,默认> | ``` 注意:如果获取得是hls视频流,params结构体必须携带参数video_type 获取视频流 { "mid": "3245200221001", "timestamp": 1616586532, "token": "33e1121ae1171781230337b9e88c1aa406572d765dd33b92523bd38a4002de5e", "command": "getStream", "params": { "netId": "lygw01010001", "channel":1 } } 停止播放 { "mid": "3245200221001", "timestamp": 1616586532, "token": "33e1121ae1171781230337b9e88c1aa406572d765dd33b92523bd38a4002de5e", "command": "death", "params": { "netId": "lygw01010001", "channel":1 } } 活跃信号 { "mid": "3245200221001", "timestamp": 1616586532, "token": "33e1121ae1171781230337b9e88c1aa406572d765dd33b92523bd38a4002de5e", "command": "active", "params": { "netId": "lygw01010001", "channel":1 } } ``` ### 订阅Topic:v1.1/client/<customer_id>/media/reply | 名称 | 类型 | 描述 | | --- | --- | --- | | mid | String | 会话ID | | timestamp| String | 时间戳 | | command| String | 指令 | | code| Number| 状态码 0-成功 1- 失败 | | msg| String | 消息描述 | | result| Object | 参数 | #### result结构体 | 名称 | 类型 | 描述 | | --- | --- | --- | | uri| String | 视频流地址 | ``` { "mid": "3245200221001", "timestamp": 1616586532, "command": "getStream", "code": 0, "msg": "操作成功", "result": { "uri": "视频流地址", } } ```