Skip to content

Commit

Permalink
make screen sharing call FF friendly :D
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
t3chguy committed May 14, 2017
1 parent cb9a9e8 commit 0415b9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/webrtc/call.js
Expand Up @@ -155,7 +155,7 @@ MatrixCall.prototype.placeVideoCall = function(remoteVideoElement, localVideoEle
/**
* Place a screen-sharing call to this room. This includes audio.
* <b>This method is EXPERIMENTAL and subject to change without warning. It
* only works in Google Chrome.</b>
* only works in Google Chrome and Firefox >= 44.</b>
* @param {Element} remoteVideoElement a <code>&lt;video&gt;</code> DOM element
* to render video to.
* @param {Element} localVideoElement a <code>&lt;video&gt;</code> DOM element
Expand All @@ -166,7 +166,7 @@ MatrixCall.prototype.placeScreenSharingCall =
function(remoteVideoElement, localVideoElement) {
debuglog("placeScreenSharingCall");
checkForErrorListener(this);
const screenConstraints = _getChromeScreenSharingConstraints(this);
const screenConstraints = _getScreenSharingConstraints(this);
if (!screenConstraints) {
return;
}
Expand Down Expand Up @@ -1193,7 +1193,7 @@ const _createPeerConnection = function(self) {
return pc;
};

const _getChromeScreenSharingConstraints = function(call) {
const _getScreenSharingConstraints = function(call) {
const screen = global.screen;
if (!screen) {
call.emit("error", callError(
Expand All @@ -1205,6 +1205,7 @@ const _getChromeScreenSharingConstraints = function(call) {

return {
video: {
mediaSource: 'screen',
mandatory: {
chromeMediaSource: "screen",
chromeMediaSourceId: "" + Date.now(),
Expand Down

0 comments on commit 0415b9c

Please sign in to comment.