From a1bfb41aefe682ad1d955baa448df2769eef390c Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 5 Jan 2018 17:30:18 -0500 Subject: #563 if you tap on an event which is being recorded, show live instead --- www/js/EventModalCtrl.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'www/js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 73f45474..871051ad 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -1276,6 +1276,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.onSwipeEvent = function(eid, dirn) { + if ($scope.liveFeedMid) return; //console.log("HERE"); var ld = NVRDataModel.getLogin(); if (!ld.canSwipeMonitors) return; @@ -1583,6 +1584,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro NVRDataModel.log("*** Constructed API for detailed events: " + myurl); $scope.humanizeTime = "..."; $scope.mName = "..."; + $scope.liveFeedMid = ''; $http.get(myurl) .then(function(success) { @@ -1595,6 +1597,9 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (!event.Event.EndTime) { $scope.eventWarning = $translate.instant('kEventStillRecording'); + // if this happens we get to live feed + $scope.liveFeedMid = event.Event.MonitorId; + NVRDataModel.log ("Event not ready, setting live view, with MID="+$scope.liveFeedMid); } event.Event.BasePath = computeBasePath(event); -- cgit v1.2.3