diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-09 11:32:06 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-09 11:32:06 -0400 |
| commit | adb3927065bc2908f3dc1e88922db5ec37762684 (patch) | |
| tree | 8d8ad2b28d7082e6b2ef56d44f5e98e001885858 | |
| parent | fec3d0ceb82da0685f239336d46ca0ba2acbafc1 (diff) | |
updated eventId only if present in response
| -rw-r--r-- | www/js/EventModalCtrl.js | 8 |
1 files changed, 4 insertions, 4 deletions
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; |
