From 84595e0c8402f4ce83f6a2c3431a671462ddeebb Mon Sep 17 00:00:00 2001
From: xiaoQQya <xiaoQQya@126.com>
Date: 星期一, 13 三月 2023 17:53:50 +0800
Subject: [PATCH] perf(jessibuca): 升级 jessibuca 2023-03-8 v3.1.28 版本, 修改 jessibuca 参数使用硬解码优化播放黑屏问题, https 环境下使用 WCS 硬解码, http 环境下使用 MSE 硬解码, H265 视频自动使用 wasm 软解码

---
 web_src/src/components/live.vue |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/web_src/src/components/live.vue b/web_src/src/components/live.vue
index 12bbf54..a691418 100644
--- a/web_src/src/components/live.vue
+++ b/web_src/src/components/live.vue
@@ -135,14 +135,17 @@
       this.loading = true
       this.$axios({
         method: 'get',
-        url: '/api/play/start/' + deviceId + '/' + channelId
+        url: './api/play/start/' + deviceId + '/' + channelId
       }).then(function (res) {
-        // that.isLoging = false;
-        console.log('=====----=====')
-        console.log(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);
         }

--
Gitblit v1.8.0