浏览代码

Merge branch 'master' into gcj

guanchunjie 3 年之前
父节点
当前提交
464b29dae5
共有 2 个文件被更改,包括 20 次插入4 次删除
  1. 3 3
      src/components/Adult/inputModules/VideoControl.vue
  2. 17 1
      src/components/Adult/preview/VideoControl.vue

+ 3 - 3
src/components/Adult/inputModules/VideoControl.vue

@@ -36,8 +36,8 @@ export default {
         name: "视频控件",
         img_list: [],
         video_list: [],
-        loading: null,
       },
+      loading2: false,
     };
   },
   computed: {},
@@ -84,7 +84,7 @@ export default {
     },
     // 获取不同视频清晰度 definition
     getqxd(id) {
-      this.loading = this.$loading({
+      this.loading2 = this.$loading({
         lock: true,
         text: "Loading",
         spinner: "el-icon-loading",
@@ -98,7 +98,7 @@ export default {
         this.curQue.definition_list = [];
         this.curQue.definition_list.push(res["480P"]);
         this.curQue.definition_list.push(res["720P"]);
-        this.loading.close();
+        // this.loading2.close();
       });
     },
   },

+ 17 - 1
src/components/Adult/preview/VideoControl.vue

@@ -36,9 +36,25 @@ export default {
   //计算属性 类似于data概念
   computed: {},
   //监控data中数据变化
-  watch: {},
+  watch: {
+    player: {
+      handler: function () {
+        //do something
+        if (this.player._hasStart) {
+          this.zantingAudio()
+        }
+      },
+      deep: true,
+    },
+  },
   //方法集合
   methods: {
+    zantingAudio() {
+      let audio = document.getElementsByTagName("audio");
+      audio.forEach((item) => {
+        item.pause();
+      });
+    },
     // videoOut() {
     //   if (this.VideoStatus == "播放") {
     //     this.qxdShow = false;