|
@@ -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);
|
|
|
});
|
|
|
},
|