Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(screenshare): Pass _desktopSharingSourceDevice as shareOptions when available. Fixes an issue when external cam as screensharing source fails on Spot with multi-stream enabled.

Jaya Allamsettyb1931de7b0d1
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