From adb3927065bc2908f3dc1e88922db5ec37762684 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 9 Oct 2018 11:32:06 -0400 Subject: updated eventId only if present in response --- www/js/EventModalCtrl.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'www/js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 68d378dc..0e6d6be7 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -403,13 +403,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } }) .then(function (resp) { - // NVRDataModel.debug ("processEvent success:"+JSON.stringify(resp)); + //NVRDataModel.debug ("processEvent success:"+JSON.stringify(resp)); resp = resp.data; if (resp.result == "Ok") { if (resp.status) $scope.currentProgress.progress = resp.status.progress; - if (resp.status) $scope.eventId = resp.status.event; + if (resp.status && resp.status.event) $scope.eventId = resp.status.event; $scope.d_eventId = $scope.eventId; if (resp.status) $scope.currentRate = resp.status.rate; @@ -1067,8 +1067,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.constructStream = function (monitor) { + //console.log ("STREAMSTATE ="+currentStreamState); if ($scope.animationInProgress) return ""; - var stream = ""; // eventId gets populated when prepareModal completes if (currentStreamState == streamState.STOPPED || !$scope.eventId) { @@ -1092,7 +1092,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } //console.log ($scope.connKey ); - // console.log ("STREAM="+stream); + //console.log ("STREAM="+stream); //console.log ("EID="+$scope.eventId); if ($rootScope.basicAuthToken && stream) stream += "&basicauth=" + $rootScope.basicAuthToken; return stream; -- cgit v1.2.3