From b1931de7b0d149db9bc14542f1d73881cb605427 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Date: Thu, 6 Oct 2022 15:26:03 -0400 Subject: [PATCH] fix(screenshare): Pass _desktopSharingSourceDevice as shareOptions when available. Fixes an issue when external cam as screensharing source fails on Spot with multi-stream enabled. --- react/features/base/conference/middleware.web.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/react/features/base/conference/middleware.web.js b/react/features/base/conference/middleware.web.js index 9b9da3caa7..43801caf2c 100644 --- a/react/features/base/conference/middleware.web.js +++ b/react/features/base/conference/middleware.web.js @@ -186,6 +186,11 @@ async function _toggleScreenSharing({ enabled, audioOnly = false, shareOptions = if (enable) { let tracks; + const { _desktopSharingSourceDevice } = state['features/base/config']; + + if (!shareOptions.desktopSharingSources && _desktopSharingSourceDevice) { + shareOptions.desktopSharingSourceDevice = _desktopSharingSourceDevice; + } const options = { devices: [ VIDEO_TYPE.DESKTOP ], ...shareOptions