From d093aa7ff439c56a309e1778ecb66b7b13480c73 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 7 Sep 2016 16:53:49 -0400 Subject: #321 - initial code - needs cleanup and better structure. Values are littered around at the moment Former-commit-id: a5913367e5075e9b3e6eba774798d281decd4ffb --- www/js/DataModel.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'www/js/DataModel.js') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 43f350d6..11451916 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -59,7 +59,8 @@ angular.module('zmApp.controllers') 'streamingurl': "", 'maxFPS': "3", // image streaming FPS 'montageQuality': "50", // montage streaming quality in % - 'singleImageQuality': "100", // single streaming quality in % + 'singleImageQuality': "100", // event single streaming quality in % + 'monSingleImageQuality': "100", // live view quality 'montageHistoryQuality': "50", 'useSSL': false, // "1" if HTTPS 'keepAwake': true, // don't dim/dim during live view @@ -69,6 +70,7 @@ angular.module('zmApp.controllers') 'eventServerMonitors': '', // list of monitors to notify from ES 'eventServerInterval': '', // list of intervals for all monitors 'refreshSec': '2', // timer value for frame change in sec + 'refreshSecLowBW': 8, 'enableLogs': true, 'enableDebug': true, // if enabled with log messages with "debug" 'usePin': false, @@ -106,6 +108,7 @@ angular.module('zmApp.controllers') 'soundOnPush': true, 'cycleMonitors': false, 'cycleMonitorsInterval':10, // 10sec + 'enableLowBandwidth':false, @@ -688,6 +691,27 @@ angular.module('zmApp.controllers') } + if (typeof loginData.enableLowBandwidth == 'undefined') { + + loginData.enableLowBandwidth = false; + + } + $rootScope.runMode = loginData.enableLowBandwith? "low": "normal"; + + if (typeof loginData.refreshSecLowBW == 'undefined') { + + loginData.refreshSecLowBW = 8; + + } + + + + + if (typeof loginData.monSingleImageQuality == 'undefined') { + + loginData.monSingleImageQuality = 100; + + } log("DataModel init recovered this loginData as " + JSON.stringify(loginData)); } else { -- cgit v1.2.3