|
@@ -1,7 +1,5 @@
|
1
|
1
|
/* global APP */
|
2
|
2
|
|
3
|
|
-import { createScreenshotCaptureEffect } from '../../stream-effects/screenshot-capture';
|
4
|
|
-import { getBlurEffect } from '../../blur';
|
5
|
3
|
import JitsiMeetJS, { JitsiTrackErrors, browser } from '../lib-jitsi-meet';
|
6
|
4
|
import { MEDIA_TYPE } from '../media';
|
7
|
5
|
import {
|
|
@@ -9,6 +7,7 @@ import {
|
9
|
7
|
getUserSelectedMicDeviceId
|
10
|
8
|
} from '../settings';
|
11
|
9
|
|
|
10
|
+import loadEffects from './loadEffects';
|
12
|
11
|
import logger from './logger';
|
13
|
12
|
|
14
|
13
|
/**
|
|
@@ -94,29 +93,10 @@ export function createLocalTracksF(options = {}, firePermissionPromptIsShownEven
|
94
|
93
|
firefox_fake_device, // eslint-disable-line camelcase
|
95
|
94
|
resolution
|
96
|
95
|
} = state['features/base/config'];
|
97
|
|
- const constraints = options.constraints
|
98
|
|
- ?? state['features/base/config'].constraints;
|
99
|
|
-
|
100
|
|
- const blurPromise = state['features/blur'].blurEnabled
|
101
|
|
- ? getBlurEffect()
|
102
|
|
- .catch(error => {
|
103
|
|
- logger.error('Failed to obtain the blur effect instance with error: ', error);
|
104
|
|
-
|
105
|
|
- return Promise.resolve();
|
106
|
|
- })
|
107
|
|
- : Promise.resolve();
|
108
|
|
- const screenshotCapturePromise = state['features/screenshot-capture']?.capturesEnabled
|
109
|
|
- ? createScreenshotCaptureEffect(state)
|
110
|
|
- .catch(error => {
|
111
|
|
- logger.error('Failed to obtain the screenshot capture effect effect instance with error: ', error);
|
112
|
|
-
|
113
|
|
- return Promise.resolve();
|
114
|
|
- })
|
115
|
|
- : Promise.resolve();
|
116
|
|
- const loadEffectsPromise = Promise.all([ blurPromise, screenshotCapturePromise ]);
|
|
96
|
+ const constraints = options.constraints ?? state['features/base/config'].constraints;
|
117
|
97
|
|
118
|
98
|
return (
|
119
|
|
- loadEffectsPromise.then(effectsArray => {
|
|
99
|
+ loadEffects(store).then(effectsArray => {
|
120
|
100
|
// Filter any undefined values returned by Promise.resolve().
|
121
|
101
|
const effects = effectsArray.filter(effect => Boolean(effect));
|
122
|
102
|
|