浏览代码

Enables the screen capture on firefox.

master
Boris Grozev 9 年前
父节点
当前提交
f7ba684cf6
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 6
    0
      modules/RTC/RTCUtils.js
  2. 2
    0
      modules/desktopsharing/desktopsharing.js

+ 6
- 0
modules/RTC/RTCUtils.js 查看文件

@@ -93,6 +93,12 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream) {
93 93
                     }
94 94
                 ]
95 95
             };
96
+        } else if (RTCBrowserType.isFirefox()) {
97
+            constraints.video = {
98
+                mozMediaSource: "window",
99
+                mediaSource: "window"
100
+            };
101
+
96 102
         } else {
97 103
             console.error(
98 104
                 "'screen' WebRTC media source is supported only in Chrome" +

+ 2
- 0
modules/desktopsharing/desktopsharing.js 查看文件

@@ -235,6 +235,8 @@ function setDesktopSharing(method) {
235 235
             obtainDesktopStream = obtainWebRTCScreen;
236 236
             console.info("Using Chrome WebRTC for desktop sharing");
237 237
         }
238
+    } else if (RTCBrowserType.isFirefox()) {
239
+        obtainDesktopStream = obtainWebRTCScreen;
238 240
     }
239 241
 
240 242
     if (!obtainDesktopStream) {

正在加载...
取消
保存