diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-05-10 10:54:56 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-05-10 10:54:56 -0400 |
| commit | c840ddaf079ba64c24d1d3c9103b0ab319454fa8 (patch) | |
| tree | a572029aaf056a4f0481ca1c555d3ab106d59152 /www/js/app.js | |
| parent | 95fffb91059298ddfba78ac7e1d337f6b98f5bf5 (diff) | |
fix bandwidth change event not being called
Diffstat (limited to 'www/js/app.js')
| -rwxr-xr-x | www/js/app.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/www/js/app.js b/www/js/app.js index 9a0b62a7..6f9569e5 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -103,6 +103,7 @@ angular.module('zmApp', [ quantSample: 15, hashSecret: 'unused at the moment', forceMontageReloadDelay: 4500000, // 1 hr 15m, + //forceMontageReloadDelay: 5000, // 1 hr 15m, thumbWidth:200, alarmStatusTime: 10000, eventServerErrorDelay:5000, // time to wait till I report initial connect errors @@ -1315,8 +1316,9 @@ angular.module('zmApp', [ // lets see if it really works $rootScope.online = navigator.onLine; - $window.addEventListener("offline", function () { - $rootScope.$apply(function () { + document.addEventListener("offline", function () { + //console.log ("OFFLINE------------------------------------"); + $timeout(function () { $rootScope.online = false; NVRDataModel.log("Your network went offline"); @@ -1325,8 +1327,11 @@ angular.module('zmApp', [ }); }, false); - $window.addEventListener("online", function () { - $rootScope.$apply(function () { + document.addEventListener("online", function () { + //console.log ("ONLINE------------------------------------"); + $timeout(function () { + NVRDataModel.log("Your network came back online"); + $rootScope.online = true; $timeout(function () { |
