diff --git a/modules/RTC/RTCUtils.js b/modules/RTC/RTCUtils.js index a965d61e6..adf7b201e 100644 --- a/modules/RTC/RTCUtils.js +++ b/modules/RTC/RTCUtils.js @@ -93,6 +93,12 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream) { } ] }; + } else if (RTCBrowserType.isFirefox()) { + constraints.video = { + mozMediaSource: "window", + mediaSource: "window" + }; + } else { console.error( "'screen' WebRTC media source is supported only in Chrome" + diff --git a/modules/desktopsharing/desktopsharing.js b/modules/desktopsharing/desktopsharing.js index 21802b5b9..835e27a4e 100644 --- a/modules/desktopsharing/desktopsharing.js +++ b/modules/desktopsharing/desktopsharing.js @@ -235,6 +235,8 @@ function setDesktopSharing(method) { obtainDesktopStream = obtainWebRTCScreen; console.info("Using Chrome WebRTC for desktop sharing"); } + } else if (RTCBrowserType.isFirefox()) { + obtainDesktopStream = obtainWebRTCScreen; } if (!obtainDesktopStream) {