diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index c2ea803d0b..5210db3081 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -557,7 +557,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) { @@ -1011,29 +1013,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,