获取视频流地址

更新时间:2021-12-17 14:52:19

接口说明

获取视频流地址给前端播放器进行播放

基本信息

请求方式: 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 错误信息

results matching ""

    No results matching ""