瀏覽代碼

fix(rtc): fix local track removeTrack promise conference check (#1797)

* fix(rtc): fix local track removeTrack promise conference check

* ref: ignore if promise was successful or not
release-8443
Daniel McAssey 3 年之前
父節點
當前提交
ac88ed98b5
No account linked to committer's email address
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      modules/RTC/JitsiLocalTrack.js

+ 4
- 2
modules/RTC/JitsiLocalTrack.js 查看文件

601
             promise = this.setEffect();
601
             promise = this.setEffect();
602
         }
602
         }
603
 
603
 
604
+        let removeTrackPromise = Promise.resolve();
605
+
604
         if (this.conference) {
606
         if (this.conference) {
605
-            promise = promise.then(() => this.conference.removeTrack(this));
607
+            removeTrackPromise = this.conference.removeTrack(this);
606
         }
608
         }
607
 
609
 
608
         if (this.stream) {
610
         if (this.stream) {
617
                 this._onAudioOutputDeviceChanged);
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
     /**

Loading…
取消
儲存