提交 23e9bfc4 authored 作者: Anthony Minessale's avatar Anthony Minessale

tweak js for more Mozilla compat against FF Nightly

上级 7d246856
This diff was suppressed by a .gitattributes entry.
...@@ -467,11 +467,20 @@ var iceTimer; ...@@ -467,11 +467,20 @@ var iceTimer;
}); });
} }
var video = { var video = {};
mandatory: obj.options.videoParams,
optional: []
}
if (window.moz) {
video = obj.options.videoParams;
if (!video.width) video.width = video.minWidth;
if (!video.height) video.height = video.minHeight;
if (!video.frameRate) video.frameRate = video.minFrameRate;
} else {
video = {
mandatory: obj.options.videoParams,
optional: []
}
}
var useVideo = obj.options.useVideo; var useVideo = obj.options.useVideo;
if (useVideo && obj.options.useCamera && obj.options.useCamera !== "none") { if (useVideo && obj.options.useCamera && obj.options.useCamera !== "none") {
...@@ -1042,9 +1051,16 @@ var iceTimer; ...@@ -1042,9 +1051,16 @@ var iceTimer;
"maxHeight": h "maxHeight": h
}; };
if (window.moz) {
video = video.mandatory;
if (!video.width) video.width = video.minWidth;
if (!video.height) video.height = video.minHeight;
if (!video.frameRate) video.frameRate = video.minFrameRate;
}
getUserMedia({ getUserMedia({
constraints: { constraints: {
audio: false, audio: true,
video: video video: video
}, },
onsuccess: function(e) {e.stop(); console.info(w + "x" + h + " supported."); $.FSRTC.validRes.push([w, h]); checkRes(cam, func);}, onsuccess: function(e) {e.stop(); console.info(w + "x" + h + " supported."); $.FSRTC.validRes.push([w, h]); checkRes(cam, func);},
......
This diff was suppressed by a .gitattributes entry.
...@@ -179,7 +179,7 @@ function check_vid_res() ...@@ -179,7 +179,7 @@ function check_vid_res()
"minHeight": vid_height, "minHeight": vid_height,
"maxWidth": vid_width, "maxWidth": vid_width,
"maxHeight": vid_height, "maxHeight": vid_height,
//"minFrameRate": 30, "minFrameRate": 30,
//chromeMediaSource: 'screen', //chromeMediaSource: 'screen',
//mediaSource: 'screen' //mediaSource: 'screen'
}); });
...@@ -1165,7 +1165,7 @@ function init() { ...@@ -1165,7 +1165,7 @@ function init() {
"minHeight": vid_height, "minHeight": vid_height,
"maxWidth": vid_width, "maxWidth": vid_width,
"maxHeight": vid_height, "maxHeight": vid_height,
//"minFrameRate": 30, "minFrameRate": 30,
//chromeMediaSource: 'screen', //chromeMediaSource: 'screen',
//mediaSource: 'screen' //mediaSource: 'screen'
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论