mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 22:37:46 +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
21 lines
647 B
JavaScript
21 lines
647 B
JavaScript
// @flow
|
|
|
|
import { toState } from '../base/redux';
|
|
|
|
import ScreenshotCaptureSummary from './ScreenshotCaptureSummary';
|
|
|
|
/**
|
|
* Creates a new instance of ScreenshotCapture.
|
|
*
|
|
* @param {Object | Function} stateful - The redux store, state, or
|
|
* {@code getState} function.
|
|
* @returns {Promise<ScreenshotCapture>}
|
|
*/
|
|
export function createScreenshotCaptureSummary(stateful: Object | Function) {
|
|
if (!MediaStreamTrack.prototype.getSettings && !MediaStreamTrack.prototype.getConstraints) {
|
|
return Promise.reject(new Error('ScreenshotCaptureSummary not supported!'));
|
|
}
|
|
|
|
return new ScreenshotCaptureSummary(toState(stateful));
|
|
}
|