浏览代码

feat(ScreenObtainer) Allow seamless switching of tab capture.

Allow users to seamlessly switch which tab they are sharing without having to stop the current share and select a new tab again. This is supported on Chrome 107 onwards.
dev1
Jaya Allamsetty 3 年前
父节点
当前提交
784f1d4e8a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      modules/RTC/ScreenObtainer.js

+ 5
- 0
modules/RTC/ScreenObtainer.js 查看文件

221
             && this.options?.testing?.setScreenSharingResolutionConstraints;
221
             && this.options?.testing?.setScreenSharingResolutionConstraints;
222
         let video = {};
222
         let video = {};
223
 
223
 
224
+        // Allow users to seamlessly switch which tab they are sharing without having to select the tab again.
225
+        if (browser.isChromiumBased() && browser.isVersionGreaterThan(106)) {
226
+            video.surfaceSwitching = 'include';
227
+        }
228
+
224
         if (typeof desktopSharingFrameRate === 'object') {
229
         if (typeof desktopSharingFrameRate === 'object') {
225
             video.frameRate = desktopSharingFrameRate;
230
             video.frameRate = desktopSharingFrameRate;
226
         }
231
         }

正在加载...
取消
保存