From d0172f8ea11f78bae39100ebf6bf51c6508d8272 Mon Sep 17 00:00:00 2001 From: Daniel McAssey Date: Sun, 6 Feb 2022 11:26:53 +0000 Subject: [PATCH] feat(ScreenObtainer): add support for tab capture on Electron --- modules/RTC/ScreenObtainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/RTC/ScreenObtainer.js b/modules/RTC/ScreenObtainer.js index ed6b7520a8..bbcb2ea73c 100644 --- a/modules/RTC/ScreenObtainer.js +++ b/modules/RTC/ScreenObtainer.js @@ -164,7 +164,7 @@ const ScreenObtainer = { audio: audioConstraints, video: { mandatory: { - chromeMediaSource: 'desktop', + chromeMediaSource: streamType === 'tab' ? 'tab' : 'desktop', chromeMediaSourceId: streamId, minFrameRate: desktopSharingFrameRate?.min ?? SS_DEFAULT_FRAME_RATE, maxFrameRate: desktopSharingFrameRate?.max ?? SS_DEFAULT_FRAME_RATE,