Merge pull request #454 in FS/freeswitch from ~JMESQUITA/freeswitch:bugfix/FS-8092-always-selecting-the-worst-resolution to master

* commit '42d1c0c0deb23e91d1b42563d6eefa22c02df435':
  FS-8092 [verto_communicator] If there is no data in localStorage, select best resolution for selected camera.
This commit is contained in:
Brian West 2015-08-28 16:06:02 -05:00
commit 7352c8c371
2 changed files with 3 additions and 9 deletions

View File

@ -30,7 +30,7 @@
mirrorInput: false,
outgoingBandwidth: 'default',
incomingBandwidth: 'default',
vidQual: 'qvga',
vidQual: undefined,
askRecoverCall: false,
googNoiseSuppression: false,
googHighpassFilter: false,

View File

@ -123,7 +123,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
};
function cleanShareCall(that) {
that.refreshVideoResolution();
data.shareCall = null;
data.callState = 'active';
that.refreshDevices();
@ -193,7 +192,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
return {
data: data,
callState: callState,
// changeData: changeData,
// Options to compose the interface.
videoQuality: videoQuality,
@ -306,7 +304,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
});
videoQuality.forEach(function(qual){
if (w === qual.width && h === qual.height) {
if (storage.data.vidQual !== qual.id) {
if (storage.data.vidQual !== qual.id || storage.data.vidQual === undefined) {
storage.data.vidQual = qual.id;
}
}
@ -534,7 +532,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
data.instance.deviceParams({
useCamera: storage.data.selectedVideo,
useMic: storage.data.selectedAudio,
resCheck: that.refreshVideoResolution
onResCheck: that.refreshVideoResolution
});
}
@ -586,8 +584,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
call: function(destination, callback) {
console.debug('Attempting to call destination ' + destination + '.');
//this.refreshVideoResolution();
var call = data.instance.newCall({
destination_number: destination,
caller_id_name: data.name,
@ -621,8 +617,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
screenshare: function(destination, callback) {
console.log('share screen video');
this.refreshVideoResolution();
var that = this;
getScreenId(function(error, sourceId, screen_constraints) {