mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
FS-8087 #comment always make one basic call to getusermedia to ensure perms are ok
This commit is contained in:
@@ -1111,14 +1111,14 @@ var iceTimer;
|
||||
checkRes(cam, func);
|
||||
}
|
||||
|
||||
$.FSRTC.checkPerms = function () {
|
||||
$.FSRTC.checkPerms = function (runtime) {
|
||||
getUserMedia({
|
||||
constraints: {
|
||||
audio: true,
|
||||
video: true,
|
||||
},
|
||||
onsuccess: function(e) {e.stop(); console.info("media perm init complete");},
|
||||
onerror: function(e) {console.error("media perm init error");}
|
||||
onsuccess: function(e) {e.stop(); console.info("media perm init complete"); if (runtime) {runtime(true)}},
|
||||
onerror: function(e) {console.error("media perm init error"); if (runtime) {runtime(false)}}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
$.FSRTC.getValidRes(verto.options.deviceParams.useCamera, verto.options.deviceParams.onResCheck);
|
||||
} else {
|
||||
verto.options.deviceParams.useCamera = "any";
|
||||
$.FSRTC.getValidRes(undefined, undefined);
|
||||
}
|
||||
|
||||
if (!verto.options.deviceParams.useMic) {
|
||||
@@ -2599,7 +2600,9 @@
|
||||
}
|
||||
|
||||
$.verto.init = function(obj, runtime) {
|
||||
checkDevices(runtime);
|
||||
$.FSRTC.checkPerms(function() {
|
||||
checkDevices(runtime);
|
||||
});
|
||||
}
|
||||
|
||||
$.verto.genUUID = function () {
|
||||
|
||||
Reference in New Issue
Block a user