mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Changed screen capture to non effect. Effects are used to alter the stream, this feature does not need to alter the stream, it just needs access to it Changed image diff library. Previous library diff’ed the whole image, the new one has en early return threshold Use ImageCaptureAPI to take the screenshot. Added polyfill for it and polyfill for createImageBitmap Added analytics
28 lines
874 B
JavaScript
28 lines
874 B
JavaScript
// @flow
|
|
|
|
import { createVirtualBackgroundEffect } from '../../stream-effects/virtual-background';
|
|
|
|
import logger from './logger';
|
|
|
|
/**
|
|
* Loads the enabled stream effects.
|
|
*
|
|
* @param {Object} store - The Redux store.
|
|
* @returns {Promsie} - A Promise which resolves when all effects are created.
|
|
*/
|
|
export default function loadEffects(store: Object): Promise<any> {
|
|
const state = store.getState();
|
|
const virtualBackground = state['features/virtual-background'];
|
|
|
|
const backgroundPromise = virtualBackground.backgroundEffectEnabled
|
|
? createVirtualBackgroundEffect(virtualBackground)
|
|
.catch(error => {
|
|
logger.error('Failed to obtain the background effect instance with error: ', error);
|
|
|
|
return Promise.resolve();
|
|
})
|
|
: Promise.resolve();
|
|
|
|
return Promise.all([ backgroundPromise ]);
|
|
}
|