Kaynağa Gözat

!200 解决视频循环播放问题<a href="https://gitee.com/anji-plus/report/issues/IBWKEC">https://gitee.com/anji-plus/report/issues/IBWKEC</a>
Merge pull request !200 from lma/dev

Foming 4 ay önce
ebeveyn
işleme
2a3bf42627

+ 16 - 0
report-ui/src/views/bigscreenDesigner/designer/tools/configure/texts/widget-video.js

@@ -31,6 +31,22 @@ export const widgetVideo = {
         placeholder: '',
         value: 'https://www.w3school.com.cn//i/movie.ogg',
       },
+      {
+        type: 'el-switch',
+        label: '循环播放',
+        name: 'isLoop',
+        required: false,
+        placeholder: '',
+        value: false,
+      },
+      {
+        type: 'el-switch',
+        label: '自动播放(静音)',
+        name: 'autoplay',
+        required: false,
+        placeholder: '',
+        value: false,
+      },
     ],
     // 数据
     data: [],

+ 10 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/texts/widgetVideo.vue

@@ -1,5 +1,11 @@
 <template>
-  <video :style="styleColor" :src="styleColor.videoAdress" controls="controls">
+  <video 
+    :style="styleColor" 
+    :src="styleColor.videoAdress" 
+    controls="controls" 
+    :loop="styleColor.loop"
+    :autoplay="styleColor.autoplay"
+    :muted="styleColor.autoplay">
     您的浏览器不支持 video 标签。
   </video>
 </template>
@@ -29,7 +35,9 @@ export default {
         left: this.transStyle.left + "px",
         top: this.transStyle.top + "px",
         right: this.transStyle.right + "px",
-        videoAdress: this.transStyle.videoAdress
+        videoAdress: this.transStyle.videoAdress,
+        loop: this.transStyle.isLoop,
+        autoplay: this.transStyle.autoplay
       };
     }
   },