From 58a9a5cdf41fa72cad99121896d4b20d9e805080 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 21 Aug 2019 12:05:55 -0400 Subject: use snapshots when you swipe --- www/js/EventModalCtrl.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'www/js/EventModalCtrl.js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index bce632ed..e15b2dc9 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -1013,6 +1013,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro //console.log ("STREAMSTATE ="+currentStreamState); if ($scope.animationInProgress) return ""; var stream = ""; + //console.log ("SNAPSHOT FID IS "+$scope.snapshotFrameId ); // eventId gets populated when prepareModal completes if (currentStreamState == streamState.STOPPED || !$scope.eventId) { stream = ""; @@ -1039,7 +1040,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro //console.log ("EID="+$scope.eventId); if ($rootScope.basicAuthToken && stream) stream += "&basicauth=" + $rootScope.basicAuthToken; - //console.log ("STREAM="+stream); + //console.log ("SNAPSHOT IS:="+$scope.snapshotFrameId ); return stream; }; @@ -1621,7 +1622,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro }; function jumpToEvent(eid, dirn) { - $scope.snapshotFrameId = 1; + + if (isSnapShotEnabled) { + $scope.snapshotFrameId = NVR.getSnapshotFrame(); + } else { + $scope.snapshotFrameId = 1; + } + $scope.isPaused = false; //isGlobalFid = false; var oState; -- cgit v1.2.3