|
@@ -644,8 +644,8 @@ export default {
|
|
|
this.client_.on('stream-removed', event => {
|
|
|
const remoteStream = event.stream;
|
|
|
console.log('stop----');
|
|
|
- const userid_ = remoteStream.getUserId();
|
|
|
- if (userid_) {
|
|
|
+ if (remoteStream) {
|
|
|
+ const userid_ = remoteStream.getUserId();
|
|
|
const useridsplit_ = userid_.substring(0, 5);
|
|
|
if (useridsplit_ === 'wxxcx' || useridsplit_ === 'meetu') {
|
|
|
console.log('退出userid_' + useridsplit_);
|
|
@@ -661,15 +661,17 @@ export default {
|
|
|
const remoteStream = event.stream;
|
|
|
console.log('退出');
|
|
|
console.log('退出remoteStream' + remoteStream);
|
|
|
- const userid_ = remoteStream.getUserId();
|
|
|
- const useridsplit_ = userid_.substring(0, 5);
|
|
|
- console.log('退出userid_' + userid_);
|
|
|
+ if (remoteStream) {
|
|
|
+ const userid_ = remoteStream.getUserId();
|
|
|
+ const useridsplit_ = userid_.substring(0, 5);
|
|
|
+ console.log('退出userid_' + userid_);
|
|
|
|
|
|
- if (useridsplit_ === 'wxxcx' || useridsplit_ === 'meetu') {
|
|
|
- console.log('退出userid_' + useridsplit_);
|
|
|
- // 订阅远端音频和视频流
|
|
|
- if (this.index_ > 0) {
|
|
|
- this.index_ = this.index_ - 1;
|
|
|
+ if (useridsplit_ === 'wxxcx' || useridsplit_ === 'meetu') {
|
|
|
+ console.log('退出userid_' + useridsplit_);
|
|
|
+ // 订阅远端音频和视频流
|
|
|
+ if (this.index_ > 0) {
|
|
|
+ this.index_ = this.index_ - 1;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
console.log('333--index---->' + this.index);
|