diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 8 | ||||
| -rw-r--r-- | www/js/MomentCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 11 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/NVR.js | 13 |
5 files changed, 26 insertions, 10 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 71c973fb..967c80d0 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -509,6 +509,8 @@ angular.module('zmApp.controllers') var mw = parseInt(tempMon.Monitor.Width); var mh = parseInt(tempMon.Monitor.Height); + + var mo = parseInt(tempMon.Monitor.Orientation); myevents[i].Event.Rotation = ''; @@ -2854,8 +2856,6 @@ angular.module('zmApp.controllers') var tempMon = NVR.getMonitorObject(myevents[i].Event.MonitorId); if (tempMon != undefined) { - - var mw = parseInt(tempMon.Monitor.Width); var mh = parseInt(tempMon.Monitor.Height); var mo = parseInt(tempMon.Monitor.Orientation); @@ -2926,6 +2926,8 @@ angular.module('zmApp.controllers') function computeThumbnailSize(mw, mh, mo) { + + tw = Math.min(Math.round(0.35 * $rootScope.devWidth), 200); th = 150; @@ -2935,7 +2937,7 @@ angular.module('zmApp.controllers') h: 0 }; - + /* seems I really should be using strings due to horz and very but luckily parseInt will make them 0 which gets treated as "nothing to do" '0' => translate('Normal'), diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index c53974a3..915722dd 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -212,6 +212,8 @@ var masonry = null; for (var i = 0; i < monitors.length; i++) { if (mid == monitors[i].Monitor.Id) { + + return { width: monitors[i].Monitor.Width, height: monitors[i].Monitor.Height, diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 19117627..14eb4429 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -1278,24 +1278,26 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $scope.constructSingleStream = function () { + var ld = NVR.getLogin(); var scale = (currentStreamState == streamState.SNAPSHOT_LOWQUALITY) ? '10':$scope.quality; var stream; - var fps = NVR.getLogin().singleliveFPS; + var fps =ld.singleliveFPS; stream = $scope.monitor.Monitor.streamingURL + "/nph-zms?mode=" + getSingleStreamMode() + "&monitor=" + $scope.monitorId + - "&scale=" + scale + - '&buffer=1000'; + "&scale=" + scale; if (fps) { stream +='&maxfps='+fps; } stream += $rootScope.authSession + - "&rand=" + $rootScope.modalRand + appendSingleStreamConnKey(); + if (currentStreamState != streamState.SNAPSHOT_LOWQUALITY) + stream += "&rand=" + $rootScope.modalRand + "&buffer="+ld.liveStreamBuffer; + //console.log ("STREAM="+stream); if (stream) stream += NVR.insertBasicAuthToken(); @@ -1306,6 +1308,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ function getSingleStreamMode() { + if (currentStreamState == streamState.SNAPSHOT_LOWQUALITY) return 'single'; return $scope.isModalStreamPaused ? 'single' : 'jpeg'; } diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index d01628c3..f03677b7 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -2070,7 +2070,7 @@ angular.module('zmApp.controllers') "/nph-zms?mode=" + getMode() + "&monitor=" + monitor.Monitor.Id + "&scale=" + $scope.LoginData.montageQuality + - "&buffer=1000"+ + "&buffer="+ $scope.LoginData.liveStreamBuffer + "&rand=" + randToAvoidCacheMem + monitor.Monitor.Id; if (fps) { diff --git a/www/js/NVR.js b/www/js/NVR.js index 77fd91ab..36ddf880 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -21,7 +21,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.3.083"; + var zmAppVersion = "1.3.085"; var zmAPIVersion = null; var isBackground = false; var justResumed = false; @@ -209,6 +209,7 @@ angular.module('zmApp.controllers') 'kioskPassword': '', 'useAPICaching': true, 'pauseStreams': false, + 'liveStreamBuffer': 100, }; @@ -1597,9 +1598,14 @@ angular.module('zmApp.controllers') } + if (typeof loginData.liveStreamBuffer == 'undefined') { + loginData.liveStreamBuffer = 100; + } + loginData.canSwipeMonitors = true; loginData.forceImageModePath = false; loginData.enableBlog = true; + loginData.pauseStreams = false; } @@ -2772,7 +2778,8 @@ angular.module('zmApp.controllers') for (var i = 0; i < monitors.length; i++) { - // make them all show for now + // zm 1.33.15 prefixes 'ROTATE_' to orientation + monitors[i].Monitor.Orientation = monitors[i].Monitor.Orientation.replace('ROTATE_',''); var recordingType = ''; if (monitors[i].Monitor.SaveJPEGs > 0) { @@ -2954,6 +2961,8 @@ angular.module('zmApp.controllers') for (var i = 0; i < monitors.length; i++) { //monitors[i].Monitor.listDisplay = 'show'; + // zm 1.33.15 prefixes 'ROTATE_' to orientation + monitors[i].Monitor.Orientation = monitors[i].Monitor.Orientation.replace('ROTATE_',''); monitors[i].Monitor.isAlarmed = false; monitors[i].Monitor.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); monitors[i].Monitor.rndKey = (Math.floor((Math.random() * 999999) + 1)).toString(); |
