|
@@ -601,8 +601,10 @@ export default class JitsiLocalTrack extends JitsiTrack {
|
601
|
601
|
promise = this.setEffect();
|
602
|
602
|
}
|
603
|
603
|
|
|
604
|
+ let removeTrackPromise = Promise.resolve();
|
|
605
|
+
|
604
|
606
|
if (this.conference) {
|
605
|
|
- promise = promise.then(() => this.conference.removeTrack(this));
|
|
607
|
+ removeTrackPromise = this.conference.removeTrack(this);
|
606
|
608
|
}
|
607
|
609
|
|
608
|
610
|
if (this.stream) {
|
|
@@ -617,7 +619,7 @@ export default class JitsiLocalTrack extends JitsiTrack {
|
617
|
619
|
this._onAudioOutputDeviceChanged);
|
618
|
620
|
}
|
619
|
621
|
|
620
|
|
- return promise.then(() => super.dispose());
|
|
622
|
+ return Promise.allSettled([ promise, removeTrackPromise ]).then(() => super.dispose());
|
621
|
623
|
}
|
622
|
624
|
|
623
|
625
|
/**
|