diff --git a/html5/verto/verto_communicator/src/config.json b/html5/verto/verto_communicator/src/config.json index e7b09aae95..c07687453c 100644 --- a/html5/verto/verto_communicator/src/config.json +++ b/html5/verto/verto_communicator/src/config.json @@ -1,4 +1,5 @@ { "login": "1008", - "password": "1234" + "password": "1234", + "dedEncWatermark": 3072 } diff --git a/html5/verto/verto_communicator/src/config.json.sample b/html5/verto/verto_communicator/src/config.json.sample index a905c6161d..96b82a8986 100644 --- a/html5/verto/verto_communicator/src/config.json.sample +++ b/html5/verto/verto_communicator/src/config.json.sample @@ -9,5 +9,6 @@ "autologin": "true", "autocall": "3500", "googlelogin": "true", - "wsURL": "wss://gamma.tollfreegateway.com/wss2" + "wsURL": "wss://gamma.tollfreegateway.com/wss2", + "dedEncWatermark": 3072 } diff --git a/html5/verto/verto_communicator/src/css/verto.css b/html5/verto/verto_communicator/src/css/verto.css index 84ca62e730..d4763f2bf9 100644 --- a/html5/verto/verto_communicator/src/css/verto.css +++ b/html5/verto/verto_communicator/src/css/verto.css @@ -1481,6 +1481,35 @@ body:-webkit-full-screen #incall .video-footer { .preview-wrapper video { transform: scaleX(-1); } + +.drop-net-info { + padding-top: 0px; + cursor: default; +} + +.drop-net-info .title { + text-align: center; + font-size: 16px; + font-weight: bold; + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; +} + +.drop-net-info .title:hover { + background-color: #f7f7f7; +} + +.drop-net-info a:hover { + color: #333 !important; +} + +.net-info .dedenc { + color: #e3d95b; +} + #mic-meter { position: absolute; bottom: 5px; diff --git a/html5/verto/verto_communicator/src/partials/dialpad.html b/html5/verto/verto_communicator/src/partials/dialpad.html index f24e28331d..e5711d1ef2 100644 --- a/html5/verto/verto_communicator/src/partials/dialpad.html +++ b/html5/verto/verto_communicator/src/partials/dialpad.html @@ -1,4 +1,10 @@ -
+
+

Calling to {{ dialpadNumber }}...

+ + + +
+
diff --git a/html5/verto/verto_communicator/src/partials/menu.html b/html5/verto/verto_communicator/src/partials/menu.html index b14aad0061..55e0cee35b 100644 --- a/html5/verto/verto_communicator/src/partials/menu.html +++ b/html5/verto/verto_communicator/src/partials/menu.html @@ -19,9 +19,21 @@
+ - -

Dedicated Remote Encoder

-
Select a non default bandwidth to use a dedicated remote encoder.
+
+

Dedicated Remote Encoder enabled. +

-
-

Dedicated Remote Encoder enabled. -

+
+ +
-
- - -
+
+ +
-
- - +
+ + +
+ +
+ + +
+ +
+ + +
diff --git a/html5/verto/verto_communicator/src/storageService/services/splash_screen.js b/html5/verto/verto_communicator/src/storageService/services/splash_screen.js index d9be180147..13c238bdd0 100644 --- a/html5/verto/verto_communicator/src/storageService/services/splash_screen.js +++ b/html5/verto/verto_communicator/src/storageService/services/splash_screen.js @@ -82,15 +82,13 @@ 'message': 'Check Connection Speed.' }; - if(!verto.instance) { + if (storage.data.autoBand && verto.instance) { + verto.testSpeed(cb); + } else { resolve(result); - return; } - verto.testSpeed(cb); - function cb(data) { - resolve(result); } }); diff --git a/html5/verto/verto_communicator/src/storageService/services/storage.js b/html5/verto/verto_communicator/src/storageService/services/storage.js index 2ac76532f6..b344ea2324 100644 --- a/html5/verto/verto_communicator/src/storageService/services/storage.js +++ b/html5/verto/verto_communicator/src/storageService/services/storage.js @@ -35,7 +35,9 @@ askRecoverCall: false, googNoiseSuppression: true, googHighpassFilter: true, - googEchoCancellation: true + googEchoCancellation: true, + autoBand: true, + testSpeedJoin: true }; data.$default(defaultSettings); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js index 14a8846f45..305befeea1 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js @@ -97,8 +97,17 @@ /** * Call to the number in the $rootScope.dialpadNumber. */ + $scope.loading = false; $rootScope.call = function(extension) { - return call(extension); + if (!storage.data.testSpeedJoin || !$rootScope.dialpadNumber) { + return call(extension); + } + $scope.loading = true; + + verto.testSpeed(function() { + $scope.loading = false; + call(extension); + }); } } ]); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js index 4a00c021c0..4a4a3accfe 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js @@ -52,7 +52,9 @@ storage.data.email = verto.data.email; storage.data.login = verto.data.login; storage.data.password = verto.data.password; - verto.testSpeed(); + if (storage.data.autoBand) { + verto.testSpeed(); + } if (redirect && storage.data.preview) { $location.path('/preview'); @@ -181,6 +183,9 @@ }; function onWSLogin(ev, data) { + if(storage.data.autoBand) { + verto.testSpeed(); + } if(!ws_modalInstance) { return; }; diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js index 6d77567714..f2111ad20e 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js @@ -4,10 +4,36 @@ angular .module('vertoControllers') .controller('MenuController', ['$scope', '$http', '$location', - 'verto', 'storage', - function($scope, $http, $location, verto, storage) { + 'verto', 'storage', '$rootScope', + function($scope, $http, $location, verto, storage, $rootScope) { console.debug('Executing MenuController.'); - } + $scope.storage = storage; + + $rootScope.$on('testSpeed', function(e, data) { + var dedEncWatermark = storage.data.dedEncWatermark; + var vidQual = storage.data.vidQual; + + $scope.bandDown = data.downKPS; + $scope.bandUp = data.upKPS; + $scope.dedEnc = storage.data.useDedenc; + + $scope.iconClass = 'mdi-device-signal-wifi-3-bar'; + + if ($scope.bandDown < dedEncWatermark) { + $scope.iconClass = 'mdi-device-signal-wifi-1-bar dedenc'; + } else if ($scope.bandDown >= 2*dedEncWatermark) { + $scope.iconClass = 'mdi-device-signal-wifi-4-bar'; + } + + verto.videoQuality.forEach(function(vid) { + if (vid.id == vidQual){ + $scope.vidRes = vid.label; + } + }); + + $scope.$apply(); + }); + } ]); -})(); \ No newline at end of file +})(); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js index cee39a393e..7bc9aa7452 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js @@ -15,6 +15,9 @@ $scope.ok = function() { storage.changeData($scope.mydata); verto.data.instance.iceServers(storage.data.useSTUN); + if (storage.data.autoBand) { + $scope.testSpeed(); + } $modalInstance.close('Ok.'); }; @@ -30,7 +33,8 @@ return verto.testSpeed(cb); function cb(data) { - + $scope.mydata.vidQual = storage.data.vidQual; + $scope.speedMsg = 'Up: ' + data.upKPS + ' Down: ' + data.downKPS; $scope.$apply(); } }; @@ -44,11 +48,22 @@ }; }; - $scope.checkUseDedRemoteEncoder = function(option) { - if ($scope.mydata.incomingBandwidth != 'default' || $scope.mydata.outgoingBandwidth != 'default') { - $scope.mydata.useDedenc = true; + $scope.checkAutoBand = function(option) { + $scope.mydata.useDedenc = false; + if (!option) { + $scope.mydata.outgoingBandwidth = 'default'; + $scope.mydata.incomingBandwidth = 'default'; + $scope.mydata.vidQual = 'hd'; } else { + $scope.mydata.testSpeedJoin = true; + } + }; + + $scope.checkUseDedRemoteEncoder = function(option) { + if (['0', 'default', '5120'].indexOf(option) != -1) { $scope.mydata.useDedenc = false; + } else { + $scope.mydata.useDedenc = true; } }; } diff --git a/html5/verto/verto_communicator/src/vertoService/services/configService.js b/html5/verto/verto_communicator/src/vertoService/services/configService.js index 105a20b324..e5f5cf30f5 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/configService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/configService.js @@ -40,6 +40,12 @@ vertoService.service('config', ['$rootScope', '$http', '$location', 'storage', ' verto.data.googlelogin = data.googlelogin; verto.data.googleclientid = data.googleclientid; } + + if (data.dedEncWatermark) { + storage.data.dedEncWatermark = data.dedEncWatermark; + } else { + storage.data.dedEncWatermark = 3072; + } angular.extend(verto.data, data); @@ -62,13 +68,13 @@ vertoService.service('config', ['$rootScope', '$http', '$location', 'storage', ' console.debug("auto login per config.json"); verto.data.autologin_done = true; } - + if(verto.data.autologin && storage.data.name.length && storage.data.email.length && storage.data.login.length && storage.data.password.length) { - $rootScope.$emit('config.http.success', data); + $rootScope.$emit('config.http.success', data); }; return response; }, function(response) { - $rootScope.$emit('config.http.error', response); + $rootScope.$emit('config.http.error', response); return response; }); @@ -79,4 +85,3 @@ vertoService.service('config', ['$rootScope', '$http', '$location', 'storage', ' 'configure': configure }; }]); - diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 62678396e2..36b191d44c 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -805,20 +805,29 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora testSpeed: function(cb) { data.instance.rpcClient.speedTest(1024 * 256, function(e, data) { - var outBand = Math.ceil(data.upKPS * .75), - inBand = Math.ceil(data.downKPS * .75); + var upBand = Math.ceil(data.upKPS * .75), + downBand = Math.ceil(data.downKPS * .75); - storage.data.vidQual = 'hd'; - if (outBand < 1024) { - storage.data.vidQual = 'vga'; - } - if (outBand < 512) { - storage.data.vidQual = 'qvga'; + if (storage.data.autoBand) { + storage.data.incomingBandwidth = downBand; + storage.data.outgoingBandwidth = upBand; + storage.data.useDedenc = downBand <= storage.data.dedEncWatermark; + storage.data.vidQual = 'hd'; + + if (upBand < 512) { + storage.data.vidQual = 'qvga'; + } + else if (upBand < 1024) { + storage.data.vidQual = 'vga'; + } } - if(cb) cb(data); - // console.info("Up: " + data.upKPS, "Down: ", data.downKPS); + if(cb) { + cb(data); + } + + $rootScope.$emit('testSpeed', data); }); }, /**