提交 880fb810 authored 作者: Stefan Yohansson's avatar Stefan Yohansson 提交者: root

FS-7977 - [Verto Communicator] Fixing default resolution and cleaning code

上级 3e785654
...@@ -1040,7 +1040,11 @@ var iceTimer; ...@@ -1040,7 +1040,11 @@ var iceTimer;
var checkRes = function (cam, func) { var checkRes = function (cam, func) {
if (resI >= resList.length) { if (resI >= resList.length) {
if (func) return func(); var res = {
'validRes': $.FSRTC.validRes,
'bestResSupported': $.FSRTC.bestResSupported()
};
if (func) return func(res);
return; return;
} }
......
...@@ -20,17 +20,17 @@ var vertoApp = angular.module('vertoApp', [ ...@@ -20,17 +20,17 @@ var vertoApp = angular.module('vertoApp', [
vertoApp.config(['$routeProvider', vertoApp.config(['$routeProvider',
function($routeProvider) { function($routeProvider) {
$routeProvider. $routeProvider.
when('/login', { when('/login', {
title: 'Login', title: 'Login',
templateUrl: 'partials/login.html', templateUrl: 'partials/login.html',
controller: 'LoginController' controller: 'LoginController'
}). }).
when('/dialpad', { when('/dialpad', {
title: 'Dialpad', title: 'Dialpad',
templateUrl: 'partials/dialpad.html', templateUrl: 'partials/dialpad.html',
controller: 'DialPadController' controller: 'DialPadController'
}). }).
when('/incall', { when('/incall', {
title: 'In a Call', title: 'In a Call',
templateUrl: 'partials/incall.html', templateUrl: 'partials/incall.html',
controller: 'InCallController' controller: 'InCallController'
...@@ -40,25 +40,26 @@ vertoApp.config(['$routeProvider', ...@@ -40,25 +40,26 @@ vertoApp.config(['$routeProvider',
templateUrl: 'partials/contributors.html', templateUrl: 'partials/contributors.html',
controller: 'ContributorsController', controller: 'ContributorsController',
}).*/ }).*/
when('/browser-upgrade', { when('/browser-upgrade', {
title: '', title: '',
templateUrl: 'partials/browser_upgrade.html', templateUrl: 'partials/browser_upgrade.html',
controller: 'BrowserUpgradeController' controller: 'BrowserUpgradeController'
}). }).
otherwise({ otherwise({
redirectTo: '/login' redirectTo: '/login'
}); });
}]); }
]);
vertoApp.run(['$rootScope', '$location', 'toastr', 'prompt', vertoApp.run(['$rootScope', '$location', 'toastr', 'prompt',
function($rootScope, $location, toastr, prompt) { function($rootScope, $location, toastr, prompt) {
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) { $rootScope.$on('$routeChangeSuccess', function(event, current, previous) {
$rootScope.title = current.$$route.title; $rootScope.title = current.$$route.title;
}); });
$rootScope.safeProtocol = false; $rootScope.safeProtocol = false;
if(window.location.protocol == 'https:') { if (window.location.protocol == 'https:') {
$rootScope.safeProtocol = true; $rootScope.safeProtocol = true;
} }
...@@ -79,7 +80,7 @@ vertoApp.run(['$rootScope', '$location', 'toastr', 'prompt', ...@@ -79,7 +80,7 @@ vertoApp.run(['$rootScope', '$location', 'toastr', 'prompt',
message: message, message: message,
input: true, input: true,
label: label label: label
}).then(function (ret) { }).then(function(ret) {
if (angular.isFunction(callback)) { if (angular.isFunction(callback)) {
callback(ret); callback(ret);
} }
...@@ -89,4 +90,5 @@ vertoApp.run(['$rootScope', '$location', 'toastr', 'prompt', ...@@ -89,4 +90,5 @@ vertoApp.run(['$rootScope', '$location', 'toastr', 'prompt',
}; };
}]); }
]);
...@@ -18,7 +18,7 @@ vertoDirectives.directive('videoTag', ...@@ -18,7 +18,7 @@ vertoDirectives.directive('videoTag',
// Moving the video tag to the new place inside the incall page. // Moving the video tag to the new place inside the incall page.
console.log('Moving the video to element.'); console.log('Moving the video to element.');
jQuery('video').removeClass('hide').appendTo(element); jQuery('video').removeClass('hide').appendTo(element);
jQuery('video').css('display','block'); jQuery('video').css('display', 'block');
scope.callActive(); scope.callActive();
element.on('$destroy', function() { element.on('$destroy', function() {
...@@ -62,19 +62,19 @@ vertoDirectives.directive('showControls', ...@@ -62,19 +62,19 @@ vertoDirectives.directive('showControls',
jQuery('.video-footer').fadeIn('slow'); jQuery('.video-footer').fadeIn('slow');
jQuery('.video-hover-buttons').fadeIn('slow'); jQuery('.video-hover-buttons').fadeIn('slow');
element.parent().bind('mousemove', function() { element.parent().bind('mousemove', function() {
if(Fullscreen.isEnabled()) { if (Fullscreen.isEnabled()) {
clearTimeout(i); clearTimeout(i);
jQuery('.video-footer').fadeIn('slow'); jQuery('.video-footer').fadeIn('slow');
jQuery('.video-hover-buttons').fadeIn(500); jQuery('.video-hover-buttons').fadeIn(500);
i = setTimeout(function () { i = setTimeout(function() {
if(Fullscreen.isEnabled()) { if (Fullscreen.isEnabled()) {
jQuery('.video-footer').fadeOut('slow'); jQuery('.video-footer').fadeOut('slow');
jQuery('.video-hover-buttons').fadeOut(500); jQuery('.video-hover-buttons').fadeOut(500);
} }
}, 3000); }, 3000);
} }
}); });
element.parent().bind('mouseleave', function () { element.parent().bind('mouseleave', function() {
jQuery('.video-footer').fadeIn(); jQuery('.video-footer').fadeIn();
jQuery('.video-hover-buttons').fadeIn(); jQuery('.video-hover-buttons').fadeIn();
}); });
...@@ -84,4 +84,4 @@ vertoDirectives.directive('showControls', ...@@ -84,4 +84,4 @@ vertoDirectives.directive('showControls',
return { return {
link: link link: link
}; };
}); });
...@@ -2,34 +2,36 @@ ...@@ -2,34 +2,36 @@
var storageService = angular.module('storageService', ['ngStorage']); var storageService = angular.module('storageService', ['ngStorage']);
storageService.service('storage', ['$rootScope', '$localStorage', 'verto', function($rootScope, $localStorage, verto) { storageService.service('storage', ['$rootScope', '$localStorage', 'verto',
var data = $localStorage; function($rootScope, $localStorage, verto) {
var data = $localStorage;
data.$default({ data.$default({
ui_connected: false, ui_connected: false,
ws_connected: false, ws_connected: false,
cur_call: 0, cur_call: 0,
called_number: '', called_number: '',
useVideo: true, useVideo: true,
call_history: [], call_history: [],
call_start: false, call_start: false,
name: '', name: '',
email: '', email: '',
login: '', login: '',
password: '', password: '',
userStatus: 'disconnected', userStatus: 'disconnected',
mutedVideo: false, mutedVideo: false,
mutedMic: false, mutedMic: false,
verto: verto verto: angular.toJson(verto)
}); });
return { return {
data: data, data: data,
reset: function() { reset: function() {
data.ui_connected = false; data.ui_connected = false;
data.ws_connected = false; data.ws_connected = false;
data.cur_call = 0; data.cur_call = 0;
data.userStatus = 'disconnected'; data.userStatus = 'disconnected';
}, },
}; };
}]); }
]);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论