diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventModalCtrl.js | 16 | ||||
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 2 | ||||
| -rw-r--r-- | www/templates/events-modal.html | 2 |
4 files changed, 17 insertions, 5 deletions
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 6e42cfd6..f5223497 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -982,6 +982,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.constructStream = function (monitor) { + if ($scope.animationInProgress) return ""; var stream=""; // eventId gets populated when prepareModal completes @@ -1010,7 +1011,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } //console.log ("STREAM="+stream); - if ($rootScope.basicAuthToken) stream +="&basicauth="+$rootScope.basicAuthToken; + if ($rootScope.basicAuthToken && stream) stream +="&basicauth="+$rootScope.basicAuthToken; return stream; }; @@ -1020,6 +1021,12 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro return currentStreamState == streamState.SNAPSHOT; }; + $scope.isStreamStopped = function () { + // console.log ("STATE = " + currentStreamState); + return currentStreamState == streamState.STOPPED; + + } + $scope.convertSnapShotToStream = function() { currentStreamState = streamState.ACTIVE; }; @@ -1396,6 +1403,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro function neighborEvents(eid) { + // redo https:/server/zm/api/events/index/MonitorId =:5/Alarm Frames =:1.json var d = $q.defer(); // now get event details to show alarm frames var loginData = NVRDataModel.getLogin(); @@ -1557,6 +1565,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro function jumpToEvent(eid, dirn) { + maxAlarmFid = 0; + var oState; NVRDataModel.log("Event jump called with:" + eid); if (eid == "") { @@ -1599,6 +1609,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro element.addClass(slidein) .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', inWithNew); processMove(eid,dirn); + oState = currentStreamState; + currentStreamState = streamState.SNAPSHOT; }, 200); } @@ -1607,7 +1619,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro element.removeClass(slidein); $scope.animationInProgress = false; carouselUtils.setStop(false); - + currentStreamState = oState; } diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index a863aea3..97ffc45c 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -1149,7 +1149,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ //console.log ("STREAM="+stream); - stream += NVRDataModel.insertBasicAuthToken(); + if (stream) stream += NVRDataModel.insertBasicAuthToken(); return stream; diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 252a93df..53774f93 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -1726,7 +1726,7 @@ angular.module('zmApp.controllers') $rootScope.authSession + appendConnKey(monitor.Monitor.connKey); - stream += NVRDataModel.insertBasicAuthToken(); + if (stream) stream += NVRDataModel.insertBasicAuthToken(); diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 0664dbba..a00e9305 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -42,7 +42,7 @@ </div> </div> <!-- no default video --> - <div ng-if="defaultVideo!==undefined && defaultVideo!='' && !isSnapShot()"> + <div ng-if="defaultVideo!==undefined && defaultVideo!='' && !isSnapShot() && !isStreamStopped()"> <div ng-if="videoIsReady"> <!-- <div style="height:{{$root.devHeight}}px; width:{{$root.devWidth}}px;">--> |
