mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
FS-8213 #resolve [Add support to skip permission checks on verto]
This commit is contained in:
@@ -453,7 +453,10 @@
|
||||
|
||||
var audio;
|
||||
|
||||
if (obj.options.videoParams && obj.options.screenShare) {//obj.options.videoParams.chromeMediaSource == 'desktop') {
|
||||
if (obj.options.useMic && obj.options.useMic === "none") {
|
||||
console.log("Microphone Disabled");
|
||||
audio = false;
|
||||
} else if (obj.options.videoParams && obj.options.screenShare) {//obj.options.videoParams.chromeMediaSource == 'desktop') {
|
||||
|
||||
//obj.options.videoParams = {
|
||||
// chromeMediaSource: 'screen',
|
||||
@@ -523,6 +526,7 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log("Camera Disabled");
|
||||
video = false;
|
||||
useVideo = false;
|
||||
}
|
||||
@@ -590,17 +594,20 @@
|
||||
console.log("Audio constraints", mediaParams.audio);
|
||||
console.log("Video constraints", mediaParams.video);
|
||||
|
||||
if (mediaParams.audio || mediaParams.video) {
|
||||
|
||||
getUserMedia({
|
||||
constraints: {
|
||||
audio: mediaParams.audio,
|
||||
getUserMedia({
|
||||
constraints: {
|
||||
audio: mediaParams.audio,
|
||||
video: mediaParams.video
|
||||
},
|
||||
video: mediaParams.useVideo,
|
||||
onsuccess: onSuccess,
|
||||
onerror: onError
|
||||
});
|
||||
|
||||
},
|
||||
video: mediaParams.useVideo,
|
||||
onsuccess: onSuccess,
|
||||
onerror: onError
|
||||
});
|
||||
} else {
|
||||
onSuccess(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -2601,17 +2601,25 @@
|
||||
checkDevices(runtime);
|
||||
}
|
||||
|
||||
$.verto.init = function(obj, runtime, check) {
|
||||
if(check == undefined) {
|
||||
check = true;
|
||||
}
|
||||
$.FSRTC.checkPerms(function(status) {
|
||||
if(check) {
|
||||
$.verto.init = function(obj, runtime) {
|
||||
if (!obj) {
|
||||
obj = {};
|
||||
}
|
||||
|
||||
if (!obj.skipPermCheck && !obj.skipDeviceCheck) {
|
||||
$.FSRTC.checkPerms(function(status) {
|
||||
checkDevices(runtime);
|
||||
}, true, true);
|
||||
} else if (obj.skipPermCheck && !obj.skipDeviceCheck) {
|
||||
checkDevices(runtime);
|
||||
} else {
|
||||
runtime(status);
|
||||
}
|
||||
}, true, true);
|
||||
} else if (!obj.skipPermCheck && obj.skipDeviceCheck) {
|
||||
$.FSRTC.checkPerms(function(status) {
|
||||
runtime(status);
|
||||
}, true, true);
|
||||
} else {
|
||||
runtime(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.verto.genUUID = function () {
|
||||
|
Reference in New Issue
Block a user