diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-04-23 17:09:12 -0400 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-04-23 17:09:12 -0400 |
| commit | 50c8f19e2cf0cdf5e1e841bcbc11bcaaa1d7d32b (patch) | |
| tree | a98b52185da99f2d76f866e9dd684b85ec54310f /www | |
| parent | 8bb754fb65c4d707a03120d1599127e4783c915e (diff) | |
tried to do a image load detect on nph zms, did not work
Former-commit-id: 6c98c5e80833118c1353b4960d02bcdc8d2ab4f8
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 22 | ||||
| -rw-r--r-- | www/templates/events.html | 1 | ||||
| -rw-r--r-- | www/templates/monitors-modal.html | 2 |
3 files changed, 19 insertions, 6 deletions
diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 187e5f9e..789fd6f7 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -1,7 +1,7 @@ // Common Controller for the montage view /* jshint -W041 */ /* jslint browser: true*/ -/* global saveAs, cordova,StatusBar,angular,console,ionic, moment */ +/* global saveAs, cordova,StatusBar,angular,console,ionic, moment, imagesLoaded */ /* FIXME for nph events @@ -19,6 +19,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ var currentEvent = $scope.currentEvent; var nphTimer; var eventQueryHandle; + var imgLoad; // $scope.currentEventLength = parseFloat($scope.currentEvent.Event.Length); @@ -648,10 +649,14 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ }); } + // lets switch to nph the moment snapshot succeeds - $scope.finishedLoadingImage = function () { - // console.log("***Monitor image FINISHED Loading***"); + $scope.finishedModalLoadingImage = function () { + ZMDataModel.zmDebug("Monitor image loaded, switching to nph"); + $timeout.cancel(nphTimer); + //console.log("***Monitor image FINISHED Loading***"); $ionicLoading.hide(); + $scope.currentStreamMode = 'jpeg'; }; @@ -666,6 +671,11 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ moveToMonitor(m, d); }; + + $scope.finishedModalLoadingImage = function () { + // console.log("***Monitor image FINISHED Loading***"); + $ionicLoading.hide(); + }; @@ -1067,7 +1077,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $scope.$on('$ionicView.enter', function () { - + }); @@ -1767,9 +1777,11 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ } } + + $scope.$on('modal.shown', function () { - + var ld = ZMDataModel.getLogin(); currentEvent = $scope.currentEvent; $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); diff --git a/www/templates/events.html b/www/templates/events.html index 9529db8d..cda5ce57 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -38,6 +38,7 @@ <!-- lets make sure the events list is not empty as collection repeat needs height --> <div ng-if="!eventsBeingLoaded"> + <ion-list show-delete="eventList.showDelete"> <ion-item collection-repeat="event in events| filter:search.text" item-height="event.Event.height" id="item-{{$index}}" > diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index 47a29e3b..c95e1831 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -17,7 +17,7 @@ <div ng-if="!animationInProgress && !isBackground() && connKey"> - <img id="singlemonitor" style="width:100vw; height:100vh" imageonload="finishedLoadingImage()" image-spinner-loader="lines" image-spinner-src="{{LoginData.streamingurl}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" on-double-tap="closeModal();" /> + <img id="singlemonitor" style="width:100vw; height:100vh" image-spinner-loader="lines" image-spinner-src="{{LoginData.streamingurl}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" on-double-tap="closeModal();" /> |
