FS-8213 #resolve [Add support to skip permission checks on verto]

This commit is contained in:
Anthony Minessale
2015-09-25 20:00:03 -05:00
parent 73acb558cc
commit 90124856d4
5 changed files with 55 additions and 34 deletions

View File

@@ -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);
}

View File

@@ -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 () {