diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-14 18:01:00 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-14 18:01:00 -0400 |
| commit | 40e07fd39fa64b174cfe79312a96f9b82d72d4b4 (patch) | |
| tree | 97566446e4f45d2623279a0a5499d8f389a775f0 /www/js/MonitorModalCtrl.js | |
| parent | 057f40889202702fc8464b4d6f68dc1863bec6d7 (diff) | |
#602 #606 - iOS won't support multiport. Webkit bug see https://bugs.webkit.org/show_bug.cgi?id=35377
Diffstat (limited to 'www/js/MonitorModalCtrl.js')
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 9522ebee..51f08fd5 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -200,7 +200,15 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $scope.isModalStreamPaused = false; $timeout (function() { - NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL); + + if (0 && $rootScope.platformOS == 'ios') { + NVRDataModel.debug ("Webkit hack, hammering window.stop();"); + NVRDataModel.stopNetwork(); + } + else { + NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL); + } + $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); @@ -272,7 +280,13 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $interval.cancel(cycleHandle); NVRDataModel.debug("Killing single stream..."); + + if (0 && $rootScope.platformOS == 'ios') { + NVRDataModel.debug ("Webkit hack, hammering window.stop();"); + NVRDataModel.stopNetwork(); + } else { NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL); + } // $interval.cancel(modalIntervalHandle); // FIXME: Do I need to setAwake(false) here? @@ -1202,8 +1216,19 @@ function appendSingleStreamConnKey() { as(); // dregister auth success $scope.isModalActive = false; - NVRDataModel.debug("Single monitor exited killing stream"); - NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL); + + if (1 || $rootScope.platformOS != 'ios') { + + // ios calls window stop... + NVRDataModel.debug("Single monitor exited killing stream"); + NVRDataModel.killLiveStream($scope.connKey, $scope.controlURL); + } + + else { + + NVRDataModel.debug("Webkit hack, hammering window.stop();"); + NVRDataModel.stopNetwork(); + } //console.log("**MODAL REMOVED: Stopping modal timer"); $interval.cancel(intervalModalHandle); @@ -1601,6 +1626,13 @@ function appendSingleStreamConnKey() { } $scope.$on('modal.shown', function () { + + + if (0 && $rootScope.platformOS == 'ios') { + NVRDataModel.debug("Webkit hack, hammering window.stop();"); + NVRDataModel.stopNetwork(); + } + $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); $scope.monStatus = ""; $scope.isToggleListMenu = true; |
