Merge pull request #1548 in FS/freeswitch from ~THEHUNMONKGROUP/freeswitch:bugfix/FS-11284-fix-legacy-broken-video-constraints to master

* commit '31641749a737e71390016483a7e6bfbff9f77cea':
  FS-11284: Fix legacy/broken video constraints for specifying a video deviceId
This commit is contained in:
Christopher Rienzo 2018-08-28 13:06:46 +00:00
commit 928a605a8c
1 changed files with 10 additions and 16 deletions

View File

@ -567,7 +567,9 @@
if (obj.options.useCamera !== "any") {
//video.optional.push({sourceId: obj.options.useCamera});
video.deviceId = obj.options.useCamera;
video.deviceId = {
exact: obj.options.useCamera,
};
}
if (bestFrameRate) {
@ -1021,29 +1023,21 @@
return;
}
var video = {
//mandatory: {},
//optional: []
}
//FIXME
if (cam) {
//video.optional = [{sourceId: cam}];
video.deviceId = {exact: cam};
}
w = resList[resI][0];
h = resList[resI][1];
resI++;
video = {
var video = {
width: {exact: w},
height: {exact: h}
//"minWidth": w,
//"minHeight": h,
//"maxWidth": w,
//"maxHeight": h
};
if (cam !== "any") {
video.deviceId = {
exact: cam,
};
}
getUserMedia({
constraints: {
audio: ttl++ == 0,