瀏覽代碼

fix(hangup): remove device change listener

When closing and reopening a notebook, the browser will fire
a devicechange event. This event should not be listened to
after hangup because the current listener will call gum if
there is no current audio/video, which is the case after
hangup.

Initially this change was going to be remove all conference
listeners but then I noticed that the listener for devicechange
is set differently. It might be worthwhile future work, although
potentially unnecessary right now, to ensure all listeners
registered in conference.js are properly cleaned up on hangup.
j8
Leonard Kim 7 年之前
父節點
當前提交
d94093a01e
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      conference.js

+ 5
- 0
conference.js 查看文件

2525
         eventEmitter.emit(JitsiMeetConferenceEvents.BEFORE_HANGUP);
2525
         eventEmitter.emit(JitsiMeetConferenceEvents.BEFORE_HANGUP);
2526
         APP.UI.removeLocalMedia();
2526
         APP.UI.removeLocalMedia();
2527
 
2527
 
2528
+        // Remove unnecessary event listeners from firing callbacks.
2529
+        JitsiMeetJS.mediaDevices.removeEventListener(
2530
+            JitsiMediaDevicesEvents.DEVICE_LIST_CHANGED,
2531
+            this.deviceChangeListener);
2532
+
2528
         let requestFeedbackPromise;
2533
         let requestFeedbackPromise;
2529
 
2534
 
2530
         if (requestFeedback) {
2535
         if (requestFeedback) {

Loading…
取消
儲存