|
@@ -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
|
|