summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/ModalCtrl.js14
-rw-r--r--www/js/MontageHistoryCtrl.js34
-rw-r--r--www/js/app.js11
-rw-r--r--www/templates/monitors-modal.html4
-rw-r--r--www/templates/montage-history.html8
5 files changed, 56 insertions, 15 deletions
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js
index e6d9bbab..166142f1 100644
--- a/www/js/ModalCtrl.js
+++ b/www/js/ModalCtrl.js
@@ -988,12 +988,22 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
console.log("**VIEW ** ModalCtrl left");
- ZMDataModel.zmLog ("ModalCtrl:Stopping network pull...");
+ //ZMDataModel.zmLog ("ModalCtrl:Nullifying images..."");
// make sure this is applied in scope digest to stop network pull
// thats why we are doing it beforeLeave
- window.stop();
+ //window.stop();
+ ZMDataModel.zmLog ("Nullifying the streams...");
+
+ var element = document.getElementById("singlemonitor");
+ if (element)
+ {
+ ZMDataModel.zmDebug("Nullifying " + element.src);
+ element.src="";
+ }
+
+
});
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js
index 2fd5b7de..31a932c9 100644
--- a/www/js/MontageHistoryCtrl.js
+++ b/www/js/MontageHistoryCtrl.js
@@ -84,7 +84,22 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
function footerCollapse()
{
- window.stop(); // force it here - connkey changes - FIXME: investigate why
+ //window.stop(); // force it here - connkey changes - FIXME: investigate why
+
+ ZMDataModel.zmLog ("Nullifying the streams...");
+
+ for (i=0; i< $scope.MontageMonitors.length; i++)
+ {
+ var element = document.getElementById("img-"+i);
+ if (element)
+ {
+ ZMDataModel.zmDebug("Nullifying " + element.src);
+ element.src="";
+ }
+
+ }
+
+
$scope.sliderVal.realRate = $scope.sliderVal.rate *100;
ZMDataModel.zmDebug ("Playback rate is:" + $scope.sliderVal.realRate);
@@ -1326,8 +1341,21 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
}
}
- ZMDataModel.zmLog ("Forcing a window.stop() here");
- window.stop();
+ /*ZMDataModel.zmLog ("Forcing a window.stop() here");
+ window.stop();*/
+
+ ZMDataModel.zmLog ("Nullifying the streams...");
+
+ for (i=0; i< $scope.MontageMonitors.length; i++)
+ {
+ var element = document.getElementById("img-"+i);
+ if (element)
+ {
+ ZMDataModel.zmDebug("Nullifying " + element.src);
+ element.src="";
+ }
+
+ }
});
diff --git a/www/js/app.js b/www/js/app.js
index d847eac9..77bf4d48 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -686,13 +686,16 @@ angular.module('zmApp', [
return (d.promise);
})
- .error(function (error) {
+ .error(function (error, status) {
$ionicLoading.hide();
- $rootScope.loggedIntoZm = -1;
+
//console.log("**** ZM Login FAILED");
- ZMDataModel.zmLog("zmAutologin Error " + JSON.stringify(error),
- "error, but not calling auth-error emit");
+
+ // FIXME: Is this sometimes results in null
+
+ ZMDataModel.zmLog("zmAutologin Error " + JSON.stringify(error) + " and status " + status);
// bad urls etc come here
+ $rootScope.loggedIntoZm = -1;
$rootScope.$emit('auth-error', error);
d.reject("Login Error");
diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html
index 4ea01df8..f035f6cd 100644
--- a/www/templates/monitors-modal.html
+++ b/www/templates/monitors-modal.html
@@ -17,7 +17,7 @@
<div ng-if="!animationInProgress && !isBackground() && connKey">
- <img style="width:100vw; height:100vh" imageonload="finishedLoadingImage()" image-spinner-loader="lines" image-spinner-src="{{LoginData.streamingurl}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" />
+ <img id="singlemonitor" style="width:100vw; height:100vh" imageonload="finishedLoadingImage()" image-spinner-loader="lines" image-spinner-src="{{LoginData.streamingurl}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" />
</div>
<div ng-if="animationInProgress || isBackground()">
@@ -26,7 +26,7 @@
</div>
<div ng-if="$root.authSession=='undefined'">
- <img id="img-$index" ng-src="img/pausevideo.png" style="width:100vw; height:100vh; display:block;" class="object-fit_contain" width="{{((devWidth)/(7-monitorSize[$index]))}}px;" />
+ <img id="singlemonitor" ng-src="img/pausevideo.png" style="width:100vw; height:100vh; display:block;" class="object-fit_contain" width="{{((devWidth)/(7-monitorSize[$index]))}}px;" />
</div>
</div>
</ion-scroll>
diff --git a/www/templates/montage-history.html b/www/templates/montage-history.html
index c1cdd5fa..43ebd35a 100644
--- a/www/templates/montage-history.html
+++ b/www/templates/montage-history.html
@@ -49,7 +49,7 @@
<div ng-if="$root.authSession!='undefined' && !isBackground()">
<div ng-if = "!minimal && monitor.eventUrl == 'img/noevent.png' && !sliderVal.hideNoEvents">
- <img id="img-$index" image-spinner-src="{{isBackground()?'':monitor.eventUrl}}" image-spinner-loader="lines" style="
+ <img id="img-{{$index}}" image-spinner-src="{{isBackground()?'':monitor.eventUrl}}" image-spinner-loader="lines" style="
width: 100% !important;
height: auto !important;" />
<div style="position:absolute; bottom:0%; right:0%;white-space:nowrap;overflow:hidden;"
@@ -61,13 +61,13 @@
<div ng-if = "!minimal && monitor.eventUrl != 'img/noevent.png' && monitor.Monitor.connKey">
- <img ng-if="!isBackground()" id="img-$index" image-spinner-src="{{monitor.eventUrl}}&scale={{LoginData.singleImageQuality}}{{$root.authSession}}&rand={{$root.rand}}&rate={{sliderVal.realRate}}&connkey={{monitor.Monitor.connKey}}" image-spinner-loader="lines" style="
+ <img ng-if="!isBackground()" id="img-{{$index}}" image-spinner-src="{{monitor.eventUrl}}&scale={{LoginData.singleImageQuality}}{{$root.authSession}}&rand={{$root.rand}}&rate={{sliderVal.realRate}}&connkey={{monitor.Monitor.connKey}}" image-spinner-loader="lines" style="
width: 100% !important;
height: auto !important;" on-tap="togglePause(monitor.Monitor.Id)" />
- <img ng-if="isBackground()" id="img-$index" image-spinner-src="" image-spinner-loader="lines" style="
+ <img ng-if="isBackground()" id="img-{{$index}}" image-spinner-src="" image-spinner-loader="lines" style="
width: 100% !important;
height: auto !important;" />
@@ -98,7 +98,7 @@
</div> <!-- valid auth session &!background -->
<div ng-if="!$root.authSession=='undefined' || isBackground()">
- <img id="img-$index" image-spinner-src="img/pausevideo.png"
+ <img id="img-{{$index}}" image-spinner-src="img/pausevideo.png"
style="width: 100% !important;height: auto !important;" />
</div>
</div>