提交 6831fa70 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8087 #comment always make one basic call to getusermedia to ensure perms are ok

上级 0ffa3a5d
...@@ -1111,14 +1111,14 @@ var iceTimer; ...@@ -1111,14 +1111,14 @@ var iceTimer;
checkRes(cam, func); checkRes(cam, func);
} }
$.FSRTC.checkPerms = function () { $.FSRTC.checkPerms = function (runtime) {
getUserMedia({ getUserMedia({
constraints: { constraints: {
audio: true, audio: true,
video: true, video: true,
}, },
onsuccess: function(e) {e.stop(); console.info("media perm init complete");}, onsuccess: function(e) {e.stop(); console.info("media perm init complete"); if (runtime) {runtime(true)}},
onerror: function(e) {console.error("media perm init error");} onerror: function(e) {console.error("media perm init error"); if (runtime) {runtime(false)}}
}); });
} }
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
$.FSRTC.getValidRes(verto.options.deviceParams.useCamera, verto.options.deviceParams.onResCheck); $.FSRTC.getValidRes(verto.options.deviceParams.useCamera, verto.options.deviceParams.onResCheck);
} else { } else {
verto.options.deviceParams.useCamera = "any"; verto.options.deviceParams.useCamera = "any";
$.FSRTC.getValidRes(undefined, undefined);
} }
if (!verto.options.deviceParams.useMic) { if (!verto.options.deviceParams.useMic) {
...@@ -2599,7 +2600,9 @@ ...@@ -2599,7 +2600,9 @@
} }
$.verto.init = function(obj, runtime) { $.verto.init = function(obj, runtime) {
checkDevices(runtime); $.FSRTC.checkPerms(function() {
checkDevices(runtime);
});
} }
$.verto.genUUID = function () { $.verto.genUUID = function () {
......
This diff was suppressed by a .gitattributes entry.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论