ソースを参照

fix(virtual-background): Prevent memory leak when desktop share as a virtual background is applied.

j8
tudordan7 4年前
コミット
52ee9b5151
1個のファイルの変更2行の追加1行の削除
  1. 2
    1
      react/features/virtual-background/middleware.js

+ 2
- 1
react/features/virtual-background/middleware.js ファイルの表示

@@ -4,6 +4,7 @@ import { VIDEO_TYPE } from '../base/media';
4 4
 import { MiddlewareRegistry } from '../base/redux';
5 5
 import { getLocalVideoTrack } from '../base/tracks';
6 6
 
7
+import { SET_VIRTUAL_BACKGROUND } from './actionTypes';
7 8
 import { localTrackStopped } from './functions';
8 9
 
9 10
 /**
@@ -19,7 +20,7 @@ MiddlewareRegistry.register(store => next => action => {
19 20
     const virtualSource = getState()['features/virtual-background'].virtualSource;
20 21
     const currentLocalTrack = getLocalVideoTrack(getState()['features/base/tracks']);
21 22
 
22
-    if (virtualSource?.videoType === VIDEO_TYPE.DESKTOP) {
23
+    if (virtualSource?.videoType === VIDEO_TYPE.DESKTOP && action.type === SET_VIRTUAL_BACKGROUND) {
23 24
         localTrackStopped(dispatch, virtualSource, currentLocalTrack?.jitsiTrack);
24 25
     }
25 26
 

読み込み中…
キャンセル
保存