瀏覽代碼

fix(tracks): remove mute and videotype listeners on track remove

Listeners were set for when a track muted or changed its video
type, but the listeners were never removed. This would could
cause events to keep firing on the removed tracks, which would
cause redux to fire and error because the tracks were no longer
known. That the tracks still fire events after removal is
another issue...
master
Leonard Kim 8 年之前
父節點
當前提交
4eacbd9f61
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      react/features/base/tracks/actions.js

+ 3
- 0
react/features/base/tracks/actions.js 查看文件

@@ -179,6 +179,9 @@ export function trackMutedChanged(track) {
179 179
  * @returns {{ type: TRACK_REMOVED, track: Track }}
180 180
  */
181 181
 export function trackRemoved(track) {
182
+    track.removeAllListeners(JitsiTrackEvents.TRACK_MUTE_CHANGED);
183
+    track.removeAllListeners(JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED);
184
+
182 185
     return {
183 186
         type: TRACK_REMOVED,
184 187
         track: {

Loading…
取消
儲存