Skip to content

Commit

Permalink
Fix/device id firefox (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
enricop89 authored and jcague committed Apr 18, 2017
1 parent 27dc114 commit 43d55d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions erizo_controller/erizoClient/src/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,19 @@ Erizo.GetUserMedia = function (config, callback, error) {
} else {
if (config.video && Erizo.getBrowser() === 'mozilla') {
var ffConfig = {video:{}, audio: config.audio, screen: config.screen};
if (config.audio.mandatory !== undefined) {
var audioCfg = config.audio.mandatory;
if (audioCfg.sourceId) {
ffConfig.audio.deviceId = audioCfg.sourceId;
}
}
if (config.video.mandatory !== undefined) {
var videoCfg = config.video.mandatory;
ffConfig.video.width = {min: videoCfg.minWidth, max: videoCfg.maxWidth};
ffConfig.video.height = {min: videoCfg.minHeight, max: videoCfg.maxHeight};
if (videoCfg.sourceId) {
ffConfig.video.deviceId = videoCfg.sourceId;
}

}
if (config.video.optional !== undefined) {
Expand Down

0 comments on commit 43d55d8

Please sign in to comment.