diff options
Diffstat (limited to 'www/js')
| -rwxr-xr-x | www/js/DataModel.js | 27 | ||||
| -rw-r--r-- | www/js/LoginCtrl.js | 6 | ||||
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 3 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/PortalLoginCtrl.js | 21 | ||||
| -rwxr-xr-x | www/js/app.js | 1 |
6 files changed, 27 insertions, 33 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index e94ea0a4..97bbe4fd 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -340,25 +340,25 @@ angular.module('zmApp.controllers') // disable for now, getAuthHash needs work - /* if (versionCompare(currentServerVersion, "1.31.41") != -1 ) { + if (versionCompare(currentServerVersion, "1.31.44") != -1 ) { - myurl = loginData.apiurl+'/host/getAuthKey.json'; - debug ("Server version > 1.31.41, so using AuthHash API:"+myurl); + myurl = loginData.apiurl+'/host/getCredentials.json'; + debug ("Server version > 1.31.41, so using getCredentials API:"+myurl); $http.get(myurl) .then (function (s) { - console.log ("GOT " + JSON.stringify(s)); - if (!s.data || !s.data.auth_key ) { + debug("Credentials API returned: " + JSON.stringify(s)); + if (!s.data || !s.data.credentials ) { $rootScope.authSession = "undefined"; d.resolve($rootScope.authSession); - debug ("AuthHash API Succeded, but did NOT return auth_key key: "+JSON.stringify(s)); + debug ("getCredentials() API Succeded, but did NOT return credentials key: "+JSON.stringify(s)); return d.promise; } else { - $rootScope.authSession = "&"+s.data.auth_key; + $rootScope.authSession = "&"+s.data.credentials; if (s.data.append_password=='1') { - $rootScope.athSession = $rootScope.authSession + + $rootScope.authSession = $rootScope.authSession + loginData.password; } d.resolve($rootScope.authSession); @@ -376,7 +376,7 @@ angular.module('zmApp.controllers') ); return d.promise; - }*/ + } //currentServerVersion var as = 'undefined'; @@ -1009,10 +1009,13 @@ angular.module('zmApp.controllers') } + console.log ("INIT SIMUL="+loginData.disableSimulStreaming); + console.log ("INIT PLATFORM IS="+$rootScope.platformOS); if (typeof loginData.disableSimulStreaming == 'undefined') { + loginData.disableSimulStreaming = ($rootScope.platformOS == 'ios')?true:false; - + console.log ("INIT DISABLING SIMUL:"+loginData.disableSimulStreaming); } @@ -1941,7 +1944,7 @@ angular.module('zmApp.controllers') // console.log ("STEP 1: ST="+st); - if (zmsPort <=0 ) + if (zmsPort <=0 || loginData.disableSimulStreaming) { if (p.port || s.port) { st += (s.port ? ":" + s.port : ":" + p.port); @@ -1992,7 +1995,7 @@ angular.module('zmApp.controllers') var st2 = loginData.streamingurl; - if (zmsPort >0) { + if (zmsPort >0 && !loginData.disableSimulStreaming) { // we need to insert minport st2 = ""; var p2 = URI.parse(loginData.streamingurl); diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index 9a21f654..a6d50530 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -261,6 +261,12 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r if ($stateParams.wizard == "true") { NVRDataModel.log("Creating new login entry for wizard"); $scope.loginData = angular.copy(NVRDataModel.getDefaultLoginObject()); + + // default object has this as false + if ($rootScope.platformOS=='ios') { + $scope.loginData.disableSimulStreaming = true; + } + $scope.loginData.serverName = $rootScope.wizard.serverName; $scope.loginData.url = $rootScope.wizard.loginURL; $scope.loginData.apiurl = $rootScope.wizard.apiURL; diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 49fe3741..a863aea3 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -288,8 +288,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ } else { NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL); } - // $interval.cancel(modalIntervalHandle); - + // $interval.cancel(modalIntervalHandle) // FIXME: Do I need to setAwake(false) here? } diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index f2f58e53..252a93df 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -1728,6 +1728,8 @@ angular.module('zmApp.controllers') stream += NVRDataModel.insertBasicAuthToken(); + + //"&rand=" + randToAvoidCacheMem; //"&rand="+$scope.randToAvoidCacheMem + diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index b2d75dc9..32fc6d50 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -326,11 +326,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic if (parseInt($rootScope.tappedMid) > 0) { NVRDataModel.debug("Going to live view "); - $state.go("app.monitors", - {}, - { - reload: true - }); + $state.go("app.monitors"); return; } @@ -368,11 +364,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic if (ld.onTapScreen == $translate.instant('kTapMontage')) { NVRDataModel.debug("Going to montage"); - $state.go("app.montage", - {}, - { - reload: true - }); + $state.go("app.montage"); return; } @@ -383,20 +375,13 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic { "id": 0, "playEvent": false - }, - { - reload: true }); return; } else // we go to live { NVRDataModel.debug("Going to live view "); - $state.go("app.monitors", - {}, - { - reload: true - }); + $state.go("app.monitors"); return; } } diff --git a/www/js/app.js b/www/js/app.js index a4ead43a..418bc93d 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -26,7 +26,6 @@ angular.module('zmApp', [ 'ionic-native-transitions', 'mgo-angular-wizard', 'pascalprecht.translate', - 'jett.ionic.scroll.sista', 'uk.ac.soton.ecs.videogular.plugins.cuepoints', 'dcbImgFallback', 'ngImageAppear', |
