feat(screenshare) - add web security fix for electron (#13096)

use send the share screen sources using the external api

---------

Co-authored-by: Gabriel Borlea <gabriel.borlea@8x8.com>
This commit is contained in:
Duduman Bogdan Vlad
2023-10-16 14:59:55 +03:00
committed by GitHub
parent f78ebbb9a9
commit 8a2e4bc628
12 changed files with 290 additions and 41 deletions

View File

@@ -67,6 +67,7 @@ import {
toggleChat
} from '../../react/features/chat/actions';
import { openChat } from '../../react/features/chat/actions.web';
import { setDesktopSources } from '../../react/features/desktop-picker/actions';
import {
processExternalDeviceRequest
} from '../../react/features/device-selection/functions';
@@ -838,6 +839,16 @@ function initCommands() {
},
'toggle-whiteboard': () => {
APP.store.dispatch(toggleWhiteboard());
},
'_request-desktop-sources-result': data => {
if (data.error) {
logger.error(`Error to retrieve desktop sources result, error data: ${data.error}`);
return;
}
if (data.success?.data?.sources) {
APP.store.dispatch(setDesktopSources(data.success.data.sources));
}
}
};
transport.on('event', ({ data, name }) => {
@@ -1279,6 +1290,19 @@ class API {
});
}
/**
* Notify request desktop sources.
*
* @param {Object} options - Object with the options for desktop sources.
* @returns {void}
*/
notifyRequestDesktopSources(options) {
this._sendEvent({
name: '_request-desktop-sources',
options
});
}
/**
* Notify external application that the video quality setting has changed.
*