Skip to content

Commit 0415b9c

Browse files
committed
make screen sharing call FF friendly :D
FF is uber nice that it lets us select the display does not seem to allow the composite ALL displays though Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent cb9a9e8 commit 0415b9c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/webrtc/call.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ MatrixCall.prototype.placeVideoCall = function(remoteVideoElement, localVideoEle
155155
/**
156156
* Place a screen-sharing call to this room. This includes audio.
157157
* <b>This method is EXPERIMENTAL and subject to change without warning. It
158-
* only works in Google Chrome.</b>
158+
* only works in Google Chrome and Firefox >= 44.</b>
159159
* @param {Element} remoteVideoElement a <code>&lt;video&gt;</code> DOM element
160160
* to render video to.
161161
* @param {Element} localVideoElement a <code>&lt;video&gt;</code> DOM element
@@ -166,7 +166,7 @@ MatrixCall.prototype.placeScreenSharingCall =
166166
function(remoteVideoElement, localVideoElement) {
167167
debuglog("placeScreenSharingCall");
168168
checkForErrorListener(this);
169-
const screenConstraints = _getChromeScreenSharingConstraints(this);
169+
const screenConstraints = _getScreenSharingConstraints(this);
170170
if (!screenConstraints) {
171171
return;
172172
}
@@ -1193,7 +1193,7 @@ const _createPeerConnection = function(self) {
11931193
return pc;
11941194
};
11951195

1196-
const _getChromeScreenSharingConstraints = function(call) {
1196+
const _getScreenSharingConstraints = function(call) {
11971197
const screen = global.screen;
11981198
if (!screen) {
11991199
call.emit("error", callError(
@@ -1205,6 +1205,7 @@ const _getChromeScreenSharingConstraints = function(call) {
12051205

12061206
return {
12071207
video: {
1208+
mediaSource: 'screen',
12081209
mandatory: {
12091210
chromeMediaSource: "screen",
12101211
chromeMediaSourceId: "" + Date.now(),

0 commit comments

Comments
 (0)