diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-11 12:04:50 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-11 12:04:50 -0400 |
| commit | e4a4af16734a7b63bf23b27ce0c6041276e6ecc3 (patch) | |
| tree | 11ba20b611300a87656041e6b201053c1c92768f /www/js/MontageCtrl.js | |
| parent | d7c5302f66c905177cf8314ffca121a0593328cd (diff) | |
#606 more cleanups
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 8c1ab309..d0afd358 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -1123,11 +1123,12 @@ angular.module('zmApp.controllers') if (simulStreaming=='1') { NVRDataModel.debug ("Killing all streams in montage to save memory/nw..."); for (var i=0; i < $scope.MontageMonitors.length; i++) { - NVRDataModel.killLiveStream($scope.MontageMonitors[i]); + NVRDataModel.killLiveStream($scope.MontageMonitors[i].Monitor.connKey, $scope.MontageMonitors[i].Monitor.controlURL); } } + $scope.controlURL = monitor.Monitor.controlURL; openModal(mid, controllable, controlid, connKey, monitor); @@ -1216,10 +1217,9 @@ angular.module('zmApp.controllers') // single connkey is removed in monitorModal NVRDataModel.debug ("Regenerating connkeys for montage..."); - for (var i=0; i < $scope.MontageMonitors.length; i++) { - $scope.MontageMonitors[i].Monitor.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); - } - + NVRDataModel.regenConnKeys(); + $scope.monitors = NVRDataModel.getMonitorsNow(); + $scope.MontageMonitors = angular.copy($scope.monitors); $scope.modal.remove(); // we did the montage, so redo flow $timeout (function() {initPackery();},zm.packeryTimer); @@ -1339,7 +1339,7 @@ angular.module('zmApp.controllers') if (!$scope.singleMonitorModalOpen && simulStreaming=='1') { NVRDataModel.debug ("Killing all streams in montage to save memory/nw..."); for (i=0; i < $scope.MontageMonitors.length; i++) { - NVRDataModel.killLiveStream($scope.MontageMonitors[i]); + NVRDataModel.killLiveStream($scope.MontageMonitors[i].Monitor.connKey, $scope.MontageMonitors[i].Monitor.controlURL); } } @@ -1374,8 +1374,6 @@ angular.module('zmApp.controllers') $scope.$on('$destroy', function() { - - console.log ("MONTAGE DESTROYED!!!!!!!!!!!!!!!!!"); }); $scope.$on('$ionicView.loaded', function() @@ -1735,7 +1733,7 @@ angular.module('zmApp.controllers') if (simulStreaming=='1') { NVRDataModel.debug ("Killing all streams in montage to save memory/nw..."); for (var i=0; i < $scope.MontageMonitors.length; i++) { - NVRDataModel.killLiveStream($scope.MontageMonitors[i]); + NVRDataModel.killLiveStream($scope.MontageMonitors[i].Monitor.connKey, $scope.MontageMonitors[i].Monitor.controlURL); } } @@ -1746,7 +1744,6 @@ angular.module('zmApp.controllers') $scope.constructStream = function(monitor) { var stream = ''; - if (!isKilled) stream = monitor.Monitor.streamingURL + "/nph-zms?mode="+getMode() + |
