xiaoQQya
2022-11-05 aae7c80fd5c6d89fb392e86648920db6c79eca51
fix(live): 修复分屏监控 HTTPS 环境下无法播放的问题
1个文件已修改
10 ■■■■ 已修改文件
web_src/src/components/live.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_src/src/components/live.vue
@@ -138,8 +138,14 @@
        url: '/api/play/start/' + deviceId + '/' + channelId
      }).then(function (res) {
        if (res.data.code === 0 && res.data.data) {
          itemData.playUrl = res.data.data.httpsFlv
          that.setPlayUrl(res.data.data.ws_flv, idxTmp)
          let videoUrl;
          if (location.protocol === "https:") {
            videoUrl = res.data.data.wss_flv;
          } else {
            videoUrl = res.data.data.ws_flv;
          }
          itemData.playUrl = videoUrl;
          that.setPlayUrl(videoUrl, idxTmp);
        } else {
          that.$message.error(res.data.msg);
        }