Skip to content

Commit

Permalink
Fixed Chrome extension-based screensharing with the newest adapter on…
Browse files Browse the repository at this point in the history
… HTML5
  • Loading branch information
prlanzarin committed Jan 25, 2019
1 parent 7697f48 commit 202d896
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bigbluebutton-html5/client/compatibility/kurento-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,14 @@ window.getScreenConstraints = function (sendSource, callback) {

kurentoManager.kurentoScreenshare.extensionInstalled = true;

// this statement sets gets 'sourceId" and sets "chromeMediaSourceId"
screenConstraints.video.chromeMediaSource = { exact: [sendSource] };
screenConstraints.video.chromeMediaSourceId = sourceId;
// Re-wrap the video constraints into the mandatory object (latest adapter)
screenConstraints.video = {}
screenConstraints.video.mandatory = {};
screenConstraints.video.mandatory.maxFrameRate = 10;
screenConstraints.video.mandatory.maxHeight = kurentoManager.kurentoScreenshare.vid_max_height;
screenConstraints.video.mandatory.maxWidth = kurentoManager.kurentoScreenshare.vid_max_width;
screenConstraints.video.mandatory.chromeMediaSource = sendSource;
screenConstraints.video.mandatory.chromeMediaSourceId = sourceId;
screenConstraints.optional = optionalConstraints;

console.log('getScreenConstraints for Chrome returns => ', screenConstraints);
Expand Down

0 comments on commit 202d896

Please sign in to comment.