diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-25 13:06:47 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-25 13:06:47 -0400 |
| commit | da1db311fb6835e8d0b60cf073cd8803e96fe0a6 (patch) | |
| tree | c187173a26ce7a32ee74cfc2d913e451d0468616 | |
| parent | ecc85318c69c09b30382f0a26a7d461619d42c47 (diff) | |
fix live playback url, show snapshot instead of auto play #725
| -rw-r--r-- | www/js/EventCtrl.js | 5 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 12 | ||||
| -rw-r--r-- | www/templates/events-modal.html | 1 |
3 files changed, 14 insertions, 4 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 1fe91c6e..51333424 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -140,7 +140,7 @@ angular.module('zmApp.controllers') }; $scope.event = event; $scope.currentEvent = event; - openModal(event); + openModal(event, 'enabled'); } @@ -161,10 +161,13 @@ angular.module('zmApp.controllers') //console.log ("********* BEFORE ENTER"); // + $scope.mid = ''; + $scope.$on ( "process-push", function () { NVRDataModel.debug (">> EventCtrl: push handler"); var s = NVRDataModel.evaluateTappedNotification(); NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s)); + $scope.mid = $rootScope.tappedMid; $ionicHistory.nextViewOptions({ disableAnimate:true, disableBack: true diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 4097b92d..58247239 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -349,7 +349,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } }) .then(function (resp) { - NVRDataModel.debug("sendCmd response:" + JSON.stringify(resp)); + // NVRDataModel.debug("sendCmd response:" + JSON.stringify(resp)); d.resolve(resp); return (d.promise); @@ -1978,7 +1978,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro NVRDataModel.log("*** Constructed API for detailed events: " + myurl); $scope.humanizeTime = "..."; $scope.mName = "..."; - $scope.liveFeedMid = ''; + $scope.liveFeedMid = $scope.mid; $http.get(myurl) .then(function (success) { @@ -1986,6 +1986,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro var event = success.data.event; currentEvent = event; $scope.event = event; + $scope.currentEvent = event; // console.log ("prepareModal DATA:"+JSON.stringify(success.data)); computeAlarmFrames(success.data); @@ -2192,7 +2193,12 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro }, function (err) { NVRDataModel.log("Error retrieving detailed frame API " + JSON.stringify(err)); - NVRDataModel.displayBanner('error', ['could not retrieve frame details', 'please try again']); + NVRDataModel.displayBanner('error', ['could not retrieve frame details']); + $scope.eventWarning = $translate.instant('kLiveView'); + // if this happens we get to live feed + $scope.liveFeedMid = $scope.mid; + + }); } diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index ad3266a8..319f8366 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -40,6 +40,7 @@ <div ng-if="liveFeedMid"> + <img image-spinner-src="{{currentEvent.Event.streamingURL}}/nph-zms?mode=jpeg&monitor={{liveFeedMid}}&connkey={{connKey}}{{$root.authSession}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-double-tap="closeModal();" img-spinner-w="1024" img-spinner-h="768" image-spinner-loader="lines" imageonload="modalImageLoaded()" |
