diff options
| -rw-r--r-- | config.xml | 2 | ||||
| -rw-r--r-- | package.json | 4 | ||||
| -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 | ||||
| -rw-r--r-- | www/templates/montage.html | 6 | ||||
| -rw-r--r-- | www/templates/timeline.html | 2 |
10 files changed, 34 insertions, 40 deletions
@@ -129,7 +129,6 @@ <plugin name="cordova-plugin-websocket" spec="^0.12.2" /> <plugin name="cordova-plugin-whitelist" spec="^1.3.2" /> <plugin name="cordova-sqlite-storage" spec="^1.5.3" /> - <plugin name="ionic-plugin-keyboard" spec="^2.2.1" /> <plugin name="org.devgeeks.Canvas2ImagePlugin" spec="https://github.com/flache/Canvas2ImagePlugin"> <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " /> </plugin> @@ -148,6 +147,7 @@ <plugin name="cordova-plugin-file" spec="^6.0.1" /> <plugin name="cordova-plugin-add-swift-support" spec="^1.7.1" /> <plugin name="cordova-plugin-certificates" spec="https://github.com/hypery2k/cordova-certificate-plugin.git" /> + <plugin name="ionic-plugin-keyboard" spec="^2.2.1" /> <engine name="ios" spec="^4.5.4" /> <engine name="android" spec="^6.3.0" /> </widget> diff --git a/package.json b/package.json index 6621f654..deed262c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "cordova-plugin-websocket": {}, "cordova-plugin-whitelist": {}, "cordova-sqlite-storage": {}, - "ionic-plugin-keyboard": {}, "org.devgeeks.Canvas2ImagePlugin": { "PHOTOLIBRARY_USAGE_DESCRIPTION": " " }, @@ -52,7 +51,8 @@ "cordova-plugin-device": {}, "cordova-plugin-file": {}, "cordova-plugin-add-swift-support": {}, - "cordova-plugin-certificates": {} + "cordova-plugin-certificates": {}, + "ionic-plugin-keyboard": {} } }, "dependencies": { 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', diff --git a/www/templates/montage.html b/www/templates/montage.html index 6a877936..139799e7 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -18,13 +18,13 @@ <button class="button button-icon button-clear ion-monitor" ng-click="cast();"> </button> --> - <!--<button class="button button-icon button-clear ion-loop" ng-click="resetSizes();"> - </button>--> + <button class="button button-icon button-clear ion-loop" ng-click="resetSizes();"> + </button> <button class="button button-icon button-clear ion-android-contract" ng-click="switchMinimal()"> </button> </ion-nav-buttons> <ion-content ng-cloak has-bouncing="false" style="background-color:#444444" delegate-handle="montage-delegate" overflow-scroll="false"> - <!--<ion-content scroll-sista ng-cloak has-bouncing="false" style="background-color:#444444" delegate-handle="montage-delegate" overflow-scroll="false">--> + <div ng-if="areImagesLoading" class="screen-note"> {{ 'kArrangingImages' | translate }}... </div> diff --git a/www/templates/timeline.html b/www/templates/timeline.html index 87785fe8..80f83e8a 100644 --- a/www/templates/timeline.html +++ b/www/templates/timeline.html @@ -17,7 +17,7 @@ <button class="button button-icon button-clear ion-log-out" ng-click="zoom(0.2)"></button> --> </ion-nav-buttons> <!--<ion-content data-tap-disabled="true">--> - <ion-content scroll-sista delegate-handle="none" overflow-scroll="false" mouse-wheel-scroll> + <ion-content delegate-handle="none" overflow-scroll="false" mouse-wheel-scroll> <div style="padding-left:15px; font-size:10px; color:grey"> {{prettify(fromDate)}} - {{prettify(toDate)}} {{tzAbbr}} ({{'kTimelineOnlyDisplaying1' | translate:translationData}}) <strong> |
