liuyu 5 anni fa
parent
commit
1cee471190
1 ha cambiato i file con 4 aggiunte e 7 eliminazioni
  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);
       });
     },