summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rwxr-xr-xwww/js/DataModel.js2
-rw-r--r--www/js/MonitorModalCtrl.js42
-rw-r--r--www/js/MontageCtrl.js4
3 files changed, 34 insertions, 14 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 61d78d86..b8bd10a6 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -1593,7 +1593,7 @@ angular.module('zmApp.controllers')
debug ("kill success for ck:"+ck+" with:"+JSON.stringify(s));
},
- function (e) {ebug ("kill success for ck:"+ck+" with:"+JSON.stringify(e));}
+ function (e) {debug ("kill success for ck:"+ck+" with:"+JSON.stringify(e));}
);
},
diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js
index 415812b9..d346a210 100644
--- a/www/js/MonitorModalCtrl.js
+++ b/www/js/MonitorModalCtrl.js
@@ -835,20 +835,38 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
}
while (found != 1);
+ // now kill stream and set up next
+ NVRDataModel.debug("Killing stream before we move on to next monitor...");
+
+ $scope.isModalStreamPaused = true;
+ var element = angular.element(document.getElementById("monitorimage"));
var slidein;
var slideout;
- var dirn = d;
- if (dirn == 1) {
- slideout = "animated slideOutLeft";
- slidein = "animated slideInRight";
- } else {
- slideout = "animated slideOutRight";
- slidein = "animated slideInLeft";
- }
+ $timeout (function() {
+ NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL);
+
+ // we should now have a paused stream, time to animate out
+
+
+ $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); // get new key for new id
+
+
+ var dirn = d;
+ if (dirn == 1) {
+ slideout = "animated slideOutLeft";
+ slidein = "animated slideInRight";
+ } else {
+ slideout = "animated slideOutRight";
+ slidein = "animated slideInLeft";
+ }
+
+
+ element.addClass(slideout)
+ .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', outWithOld);
+ });
+
+
- var element = angular.element(document.getElementById("monitorimage"));
- element.addClass(slideout)
- .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', outWithOld);
function outWithOld() {
@@ -864,6 +882,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
$scope.monitorId = mid;
$scope.monitorName = NVRDataModel.getMonitorName(mid);
$scope.monitor = NVRDataModel.getMonitorObject(mid);
+ $scope.controlURL = $scope.monitor.Monitor.controlURL;
$scope.zoneArray = [];
$scope.circlePoints = [];
getZones();
@@ -875,6 +894,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
element.removeClass(slidein);
$scope.animationInProgress = false;
+ $scope.isModalStreamPaused = false;
NVRDataModel.log("New image loaded in");
var ld = NVRDataModel.getLogin();
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 6a466740..d224c4fc 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -1239,7 +1239,7 @@ angular.module('zmApp.controllers')
{
loadAlarmStatus();
// console.log ("Refreshing Image...");
- }.bind(this), 5000);
+ }.bind(this), zm.alarmStatusTime * 1000);
intervalHandleMontageCycle = $interval(function()
{
@@ -1946,7 +1946,7 @@ angular.module('zmApp.controllers')
{
loadAlarmStatus();
// console.log ("Refreshing Image...");
- }.bind(this), 5000);
+ }.bind(this), zm.alarmStatusTime * 1000);
intervalHandleReloadPage = $interval(function()
{