fix(screenshare): Pass _desktopSharingSourceDevice as shareOptions when available.

Fixes an issue when external cam as screensharing source fails on Spot with multi-stream enabled.
This commit is contained in:
Jaya Allamsetty 2022-10-06 15:26:03 -04:00 committed by Saúl Ibarra Corretgé
parent 02da4a1c42
commit b1931de7b0
1 changed files with 5 additions and 0 deletions

View File

@ -186,6 +186,11 @@ async function _toggleScreenSharing({ enabled, audioOnly = false, shareOptions =
if (enable) { if (enable) {
let tracks; let tracks;
const { _desktopSharingSourceDevice } = state['features/base/config'];
if (!shareOptions.desktopSharingSources && _desktopSharingSourceDevice) {
shareOptions.desktopSharingSourceDevice = _desktopSharingSourceDevice;
}
const options = { const options = {
devices: [ VIDEO_TYPE.DESKTOP ], devices: [ VIDEO_TYPE.DESKTOP ],
...shareOptions ...shareOptions