liuyu 5 年之前
父節點
當前提交
1cee471190
共有 1 個文件被更改,包括 4 次插入7 次删除
  1. 4 7
      src/layout/live/detailmetting.vue

+ 4 - 7
src/layout/live/detailmetting.vue

@@ -231,16 +231,13 @@ export default {
           console.error('failed to subscribe remoteStream');
         });
       });
-      // this.client_.on('unmute-video', event => {
-      //   const remoteStream = event.stream;
-      //   // 订阅远端音频和视频流
-      //   this.index = this.index - 1;
-      //   console.log('222--index---->' + this.index);
-      // });
       this.client_.on('mute-video', event => {
         const remoteStream = event.stream;
         // 订阅远端音频和视频流
-        this.index = this.index - 1;
+        if (this.index > 0) {
+          this.index = this.index - 1;
+        }
+
         console.log('333--index---->' + this.index);
       });
     },