FS-11284: Fix legacy/broken video constraints for specifying a video deviceId
getMediaParams() was using a legacy version of the video constraint param to specify a deviceId. checkRes() was incorrectly setting video constraints such that it was not properly testing specific video devices.
This commit is contained in:
parent
d5af929660
commit
31641749a7
|
@ -557,7 +557,9 @@
|
||||||
|
|
||||||
if (obj.options.useCamera !== "any") {
|
if (obj.options.useCamera !== "any") {
|
||||||
//video.optional.push({sourceId: obj.options.useCamera});
|
//video.optional.push({sourceId: obj.options.useCamera});
|
||||||
video.deviceId = obj.options.useCamera;
|
video.deviceId = {
|
||||||
|
exact: obj.options.useCamera,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bestFrameRate) {
|
if (bestFrameRate) {
|
||||||
|
@ -1011,29 +1013,21 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var video = {
|
|
||||||
//mandatory: {},
|
|
||||||
//optional: []
|
|
||||||
}
|
|
||||||
//FIXME
|
|
||||||
if (cam) {
|
|
||||||
//video.optional = [{sourceId: cam}];
|
|
||||||
video.deviceId = {exact: cam};
|
|
||||||
}
|
|
||||||
|
|
||||||
w = resList[resI][0];
|
w = resList[resI][0];
|
||||||
h = resList[resI][1];
|
h = resList[resI][1];
|
||||||
resI++;
|
resI++;
|
||||||
|
|
||||||
video = {
|
var video = {
|
||||||
width: {exact: w},
|
width: {exact: w},
|
||||||
height: {exact: h}
|
height: {exact: h}
|
||||||
//"minWidth": w,
|
|
||||||
//"minHeight": h,
|
|
||||||
//"maxWidth": w,
|
|
||||||
//"maxHeight": h
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (cam !== "any") {
|
||||||
|
video.deviceId = {
|
||||||
|
exact: cam,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
getUserMedia({
|
getUserMedia({
|
||||||
constraints: {
|
constraints: {
|
||||||
audio: ttl++ == 0,
|
audio: ttl++ == 0,
|
||||||
|
|
Loading…
Reference in New Issue