dedsudiyu il y a 5 mois
Parent
commit
57cfd30ce6

+ 4 - 3
src/components/H5PlayerVideo/H5PlayerVideo.vue

@@ -30,7 +30,8 @@
     mounted() {
       this.$nextTick(() => {
         this.initH5Player(1)
-        this.initPlayer(this.videoData.url, 0)
+        let type = this.videoData.url.indexOf('wss') !== -1?1:0;
+        this.initPlayer(this.videoData.url, 0,type)
       })
     },
     methods: {
@@ -120,11 +121,11 @@
           }
         })
       },
-      initPlayer(url, index) {
+      initPlayer(url, index, type) {
         this.myPlugin.JS_Play(url,
           {
             playURL: url, // 流媒体播放时必传
-            mode: 0 // 解码类型:0=普通模式; 1=高级模式 默认为0
+            mode: type?type:0 // 解码类型:0=普通模式; 1=高级模式 默认为0
             // ...
           },
           index //当前窗口下标

+ 1 - 0
src/views/emergencyManagement/pageComponent/videoListComponent.vue

@@ -74,6 +74,7 @@
           floorId:this.floorId,
           passageway:'',
           subIds:[],
+          protocol:window.location.href.indexOf('https') !== -1?'wss':'ws'
         };
         iotCameraFindByCondition(obj).then(response => {
           let list = [];

+ 1 - 0
src/views/safetyOverview/pageComponent/monitoringComponents.vue

@@ -75,6 +75,7 @@
           floorId:'',
           passageway:'',
           subIds:subList,
+          protocol:window.location.href.indexOf('https') !== -1?'wss':'ws'
         };
         iotCameraFindByCondition(obj).then(response => {
           let list = [];

+ 1 - 0
src/views/videoSurveillance/pageComponent/videoComponent.vue

@@ -83,6 +83,7 @@
           floorId:this.floorId,
           passageway:'',
           subIds:[],
+          protocol:window.location.href.indexOf('https') !== -1?'wss':'ws'
         };
         iotCameraFindByCondition(obj).then(response => {
           let list = [];