dedsudiyu 3 settimane fa
parent
commit
52ee1282f6

+ 5 - 1
src/components/H5PlayerVideo/H5PlayerVideo.vue

@@ -3,6 +3,7 @@
     <div :id="videoData.id" :ref="videoData.id"></div>
     <p class="full-screen-button" v-if="!videoProps.fullShow" @click="fullScreen"></p>
     <!--<p class="full-failed-button" v-if="fullScreenType" @click="outFullScreen"></p>-->
+    <p style="position: absolute;top:200px;left:360px;color:#fff;" v-if="!playType">加载中...</p>
   </div>
 </template>
 
@@ -14,6 +15,7 @@
     },
     data() {
       return {
+        playType:true,
         fullScreenType:false,
         videoCover: localStorage.getItem('fileBrowseEnvironment') + localStorage.getItem('videoCover'),
         videoData: {},
@@ -135,11 +137,13 @@
           index //当前窗口下标
         ).then(
           () => {
+            this.$set(this,'playType',true);
             console.info('JS_Play success')
             // do you want...
           },
           (err) => {
-            console.info('JS_Play failed:', err)
+            this.$set(this,'playType',false);
+            console.info('JS_Play failed:1212121212', err)
             // do you want...
           }
         )

+ 4 - 4
src/views/components/mapComponent.vue

@@ -223,6 +223,8 @@
                 }
               }
             }
+            //发送给房间组件展示
+            this.$parent.setRoomData(obj);
             obj.videoList = [];
             //查询实验室监控
             if(obj.monitorVisable){
@@ -249,13 +251,11 @@
                 //假数据
                 // obj.videoList.push({ url: '1',cameraIndexCode: 2,})
                 // obj.videoList.push({ url: '1',cameraIndexCode: 2,})
-                //发送给房间组件展示
-                this.$parent.setRoomData(obj);
+                // 发送给监控组件
                 this.$parent.setVideoData(obj);
               });
             }else{
-              //发送给房间组件展示
-              this.$parent.setRoomData(obj);
+              // 发送给监控组件
               this.$parent.setVideoData(obj);
             }
           });