提交 928a605a authored 作者: Christopher Rienzo's avatar Christopher Rienzo

Merge pull request #1548 in FS/freeswitch from…

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

* commit '31641749':
  FS-11284: Fix legacy/broken video constraints for specifying a video deviceId
...@@ -567,7 +567,9 @@ ...@@ -567,7 +567,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) {
...@@ -1021,29 +1023,21 @@ ...@@ -1021,29 +1023,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,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论