获取视频流地址给前端播放器进行播放
请求方式: GET
请求路径:
https://prod.open-api.mysre.cn/aiot/video/stream-url
| 参数名 | 参数位置 | 参数类型 | 必填 | 默认值 | 示例 | 描述 |
|---|---|---|---|---|---|---|
| id | query | string | 是 | 3a00b545-76a2-c666-f315-a254ed5efe45 | 设备 ID | |
| protocol | query | string | 否 | hls | ezopen | 取流协议 |
| quality | query | string | 否 | 1 | 1 | 清晰度(1:高清,2:标清) |
| tenant_code | query | string | 是 | 租户代码 |
fetch("https://aiot.test.myyscm.com/aiot/api/video/stream?o=zjfunctest&id=3a00b545-76a2-c666-f315-a254ed5efe45&protocol=ezopen&quality=1", {
"headers": {
"accept": "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
"x-requested-with": "XMLHttpRequest"
},
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
});
{
"errcode": 0,
"errmsg": "",
"data": "ezopen://open.ys7.com/D01824009/1.hd.live?access_token=at.0l6y8fxe9gbjgxn7ao3ix4il1wwsbfh5-6ij5d30w4f-0aprme1-mgsion47n"
}
| 参数名 | 参数类型 | 描述 |
|---|---|---|
| errcode | number | 错误码 |
| errmsg | string | 错误信息 |
| data | string | 视频流地址 |
{
"errcode": 100,
"errmsg": "数据来源为必传字段不能为空"
}
| 参数名 | 参数类型 | 描述 |
|---|---|---|
| errcode | number | 错误码 |
| errmsg | string | 错误信息 |