提交 cc00d1d0 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8245 #resolve [Video Resolutions available in "Video Quality" drop down are not always correct]

上级 33ffdb34
......@@ -85,9 +85,6 @@
if (verto.options.deviceParams.useCamera) {
$.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) {
......
'use strict';
/* Controllers */
var videoQuality = [{
var videoQuality = [];
var videoQualitySource = [{
id: 'qvga',
label: 'QVGA 320x240',
width: 320,
......@@ -158,28 +158,28 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
function updateResolutions(supportedResolutions) {
console.debug('Attempting to sync supported and available resolutions');
var removed = 0;
//var removed = 0;
console.debug("VQ length: " + videoQualitySource.length);
console.debug(supportedResolutions);
angular.forEach(videoQuality, function(resolution, id) {
var supported = false;
angular.forEach(videoQualitySource, function(resolution, id) {
angular.forEach(supportedResolutions, function(res) {
var width = res[0];
var height = res[1];
if(resolution.width == width && resolution.height == height) {
supported = true;
videoQuality.push(resolution);
}
});
if(!supported) {
delete videoQuality[id];
++removed;
}
});
videoQuality.length = videoQuality.length - removed;
// videoQuality.length = videoQuality.length - removed;
console.debug("VQ length 2: " + videoQuality.length);
data.videoQuality = videoQuality;
console.debug(videoQuality);
data.vidQual = (videoQuality.length > 0) ? videoQuality[videoQuality.length - 1].id : null;
console.debug(data.vidQual);
return videoQuality;
};
......@@ -553,6 +553,8 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
if (data.instance && !data.instance.rpcClient.socketReady()) {
clearTimeout(data.instance.rpcClient.to);
data.instance.logout();
data.instance.login();
return;
};
data.instance = new jQuery.verto({
login: data.login + '@' + data.hostname,
......@@ -562,25 +564,24 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
ringFile: "sounds/bell_ring2.wav",
// TODO: Add options for this.
audioParams: {
googEchoCancellation: storage.data.googEchoCancellation || false,
googNoiseSuppression: storage.data.googNoiseSuppression || false,
googHighpassFilter: storage.data.googHighpassFilter || false
googEchoCancellation: storage.data.googEchoCancellation || true,
googNoiseSuppression: storage.data.googNoiseSuppression || true,
googHighpassFilter: storage.data.googHighpassFilter || true
},
iceServers: storage.data.useSTUN
}, callbacks);
data.instance.deviceParams({
useCamera: storage.data.selectedVideo,
useMic: storage.data.selectedAudio,
onResCheck: that.refreshVideoResolution
});
data.instance.deviceParams({
useCamera: storage.data.selectedVideo,
useMic: storage.data.selectedAudio,
onResCheck: that.refreshVideoResolution
});
}
if(data.mediaPerm) {
if (data.mediaPerm) {
ourBootstrap();
} else {
$.verto.init({skipDeviceCheck: true}, ourBootstrap);
$.FSRTC.checkPerms(ourBootstrap, true, true);
}
},
......
This diff was suppressed by a .gitattributes entry.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论