CzRger il y a 1 an
Parent
commit
7b3fb74d22
1 fichiers modifiés avec 25 ajouts et 27 suppressions
  1. 25 27
      src/views/screen/video-resource/important-area-focus.vue

+ 25 - 27
src/views/screen/video-resource/important-area-focus.vue

@@ -8,21 +8,21 @@
       </template>
     </div>
     <div class="right">
-      <template v-if="test.flvUrl">
-        <div style="display: flex;">
-          <FlvVideo :url="test.flvUrl"/>
-          <FlvVideo :url="test.flvUrlProxy"/>
-        </div>
-      </template>
-<!--      <div class="right-title">{{ currentInfo.areaName }}</div>-->
-<!--      <div class="right-content">-->
-<!--        <template v-for="(item, index) in currentInfo.viseoRecords?.filter((v, i) => i < 8)">-->
-<!--          <div class="video-item" v-if="item.flvUrl">-->
-<!--            <div class="video-item-title">{{item.name}}</div>-->
-<!--            <FlvVideo :url="item.flvUrl"/>-->
-<!--          </div>-->
-<!--        </template>-->
-<!--      </div>-->
+<!--      <template v-if="test.flvUrl">-->
+<!--        <div style="display: flex;">-->
+<!--          <FlvVideo :url="test.flvUrl"/>-->
+<!--          <FlvVideo :url="test.flvUrlProxy"/>-->
+<!--        </div>-->
+<!--      </template>-->
+      <div class="right-title">{{ currentInfo.areaName }}</div>
+      <div class="right-content">
+        <template v-for="(item, index) in currentInfo.viseoRecords?.filter((v, i) => i < 8)">
+          <div class="video-item">
+            <div class="video-item-title">{{item.name}}</div>
+            <FlvVideo v-if="item.flvUrl" class="flv-video" :url="item.flvUrl"/>
+          </div>
+        </template>
+      </div>
     </div>
   </div>
 </template>
@@ -410,7 +410,7 @@ export default defineComponent({
       state.currentInfo = n?.[0] || {}
     })
     watch(() => state.currentInfo, (n: any) => {
-      n?.viseoRecords.forEach((v: any) => {
+      n?.viseoRecords.filter((v, i) => i < 8).forEach((v: any) => {
         getStream(v)
       })
     })
@@ -449,7 +449,6 @@ export default defineComponent({
               obj.flvUrl = `ws://10.110.31.81/odae-video/live/${streamId}/${cC.video.source}.live.flv`
               obj.flvUrlProxy = `ws://${location.host}/${store.state.app.apiProxy.tesApi}/live/${streamId}/${cC.video.source}.live.flv`
             }
-            console.log(res)
           })
         }
       }).catch(() => {})
@@ -467,14 +466,14 @@ export default defineComponent({
         value: true,
       }, "*")
 
-      const arr: any = []
-      state.videoData.forEach(p => {
-        p.viseoRecords.forEach(v => {
-          arr.push(v)
-        })
-      })
-      state.test = arr[0]
-      getStream(state.test)
+      // const arr: any = []
+      // state.videoData.forEach(p => {
+      //   p.viseoRecords.forEach(v => {
+      //     arr.push(v)
+      //   })
+      // })
+      // state.test = arr[0]
+      // getStream(state.test)
     })
     return {
       ...toRefs(state),
@@ -581,8 +580,7 @@ export default defineComponent({
           white-space: nowrap;
           line-height: 24px;
         }
-
-        > video {
+        .flv-video {
           width: 100%;
           height: 100%;
         }