summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/LICENSE-DESKTOP-CLIENT.txt23
-rw-r--r--www/css/style.css2
-rw-r--r--www/index.html1
-rw-r--r--www/js/DataModel.js10
-rw-r--r--www/js/EventModalCtrl.js13
-rw-r--r--www/js/MontageHistoryCtrl.js6
-rw-r--r--www/js/app.js22
-rw-r--r--www/templates/devoptions.html9
-rw-r--r--www/templates/events-modal.html26
9 files changed, 96 insertions, 16 deletions
diff --git a/www/LICENSE-DESKTOP-CLIENT.txt b/www/LICENSE-DESKTOP-CLIENT.txt
new file mode 100644
index 00000000..11c8e216
--- /dev/null
+++ b/www/LICENSE-DESKTOP-CLIENT.txt
@@ -0,0 +1,23 @@
+The code is free for personal, non commercial use
+http://creativecommons.org/licenses/by-nc-sa/4.0/
+In summary: Share Alike, Adapt,Attribute, NonCommercial
+
+For Desktop Clients:
+The Desktop clients are free to download and use ONLY for users
+who are using the desktop client with the free and open source ZoneMinder
+software. If you are selling a service based on zoneminder and are either distributing the Desktop Client to your users or asking your users to use the desktop client by download it themselves, you are violating the non-commercial use. You will need to procure a license before you do so.
+
+Be nice, please.
+
+If you have any questions on licensing feel free to contact me.
+
+Ninja icon;
+https://openclipart.org/detail/172393/ninja-logo
+License: https://openclipart.org/share
+
+Blop sound for notifications:
+http://soundbible.com/2067-Blop.html
+
+
+-thanks
+
diff --git a/www/css/style.css b/www/css/style.css
index 2a9e9098..589bf7e6 100644
--- a/www/css/style.css
+++ b/www/css/style.css
@@ -370,7 +370,7 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */
.events-range-modal
{
position:absolute;
- bottom:60px;
+ bottom:30px;
left:30px;
z-index:99;
opacity:0.7;
diff --git a/www/index.html b/www/index.html
index 85f6e828..c1d25389 100644
--- a/www/index.html
+++ b/www/index.html
@@ -227,6 +227,7 @@
</ion-item>
+
<div ng-if="$root.newVersionAvailable && $root.platformOS=='desktop'">
<ion-item nav-clear menu-close href="">
<span class=" item-icon-left" >
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 73b1d6b6..a64f52a2 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -37,7 +37,8 @@ angular.module('zmApp.controllers')
'streamingurl': "",
'maxFPS': "3", // image streaming FPS
'montageQuality': "50", // montage streaming quality in %
- 'singleImageQuality': "50", // single streaming quality in %
+ 'singleImageQuality': "100", // single streaming quality in %
+ 'montageHistoryQuality':"50",
'useSSL':false, // "1" if HTTPS
'keepAwake':true, // don't dim/dim during live view
'isUseAuth':true, // true if user wants ZM auth
@@ -282,6 +283,13 @@ angular.module('zmApp.controllers')
}
+ if (typeof loginData.montageHistoryQuality == 'undefined')
+ {
+ zmDebug ("montageHistoryQuality does not exist. Setting to 50");
+ loginData.montageHistoryQuality = "50";
+
+ }
+
zmLog ("DataModel init recovered this loginData as " + JSON.stringify(loginData));
}
else
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index 4b51dba6..60d4cc37 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -14,6 +14,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
var nphTimer;
var eventQueryHandle;
$scope.loginData = ZMDataModel.getLogin();
+ $scope.currentRate='-';
var eventImageDigits = 5; // failsafe
@@ -234,6 +235,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$scope.currentProgress = resp.status.progress;
$scope.eventId = resp.status.event;
+ $scope.d_eventId = $scope.eventId;
+ $scope.currentRate = resp.status.rate;
if ($scope.currentProgress > $scope.currentEventDuration) $scope.currentProgress = $scope.currentEventDuration;
@@ -273,6 +276,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$scope.currentProgress = 0; // if = then we are at end
$scope.eventId = resp.data.status.event;
+ $scope.d_eventId = $scope.eventId;
ZMDataModel.zmDebug ("STEP 3: New eid " + $scope.eventId + " duration " + $scope.currentEventDuration);
eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
@@ -333,12 +337,14 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString();
$timeout( function () { sendCommand('14',$scope.connKey, '&offset='+$scope.currentProgress);},500);
ZMDataModel.zmDebug ("so I'm regenerating Connkey to " + $scope.connKey);
+ eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
}
});
req.error (function (resp) {
ZMDataModel.zmDebug ("processEvent error:"+JSON.stringify(resp));
+ eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
});
@@ -703,6 +709,10 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
var ld = ZMDataModel.getLogin();
$scope.loginData = ZMDataModel.getLogin();
+ $scope.singleImageQuality = ld.singleImageQuality;
+ //$scope.singleImageQuality = 100;
+
+
currentEvent = $scope.currentEvent;
@@ -1018,7 +1028,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
function jumpToEventZms(connkey, dirn) {
var cmd = dirn==1?'13':'12';
-
+ $scope.d_eventId = "...";
ZMDataModel.zmDebug ("Sending " + cmd + " to " + connkey);
$ionicLoading.show({
@@ -1182,6 +1192,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
//console.log (JSON.stringify( success));
$scope.eventName = event.Event.Name;
$scope.eventId = event.Event.Id;
+ $scope.d_eventId = $scope.eventId;
$scope.eFramesNum = event.Event.Frames;
$scope.eventDur = Math.round(event.Event.Length);
$scope.loginData = ZMDataModel.getLogin();
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js
index 2046ffcc..29a8701b 100644
--- a/www/js/MontageHistoryCtrl.js
+++ b/www/js/MontageHistoryCtrl.js
@@ -158,7 +158,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
// console.log ("Old value of event url " + $scope.MontageMonitors[j].eventUrl);
//console.log ("ldurl is " + ld.streamingurl);
- $scope.MontageMonitors[j].Monitor.eventUrl=ld.streamingurl+"/nph-zms?source=event&mode=jpeg&event="+eid+"&frame=1&replay=gapless&rate="+$scope.sliderVal.realRate+"&connkey="+$scope.MontageMonitors[j].Monitor.connKey+"&scale="+ld.singleImageQuality+"&rand="+$rootScope.rand;
+ $scope.MontageMonitors[j].Monitor.eventUrl=ld.streamingurl+"/nph-zms?source=event&mode=jpeg&event="+eid+"&frame=1&replay=gapless&rate="+$scope.sliderVal.realRate+"&connkey="+$scope.MontageMonitors[j].Monitor.connKey+"&scale="+ld.montageHistoryQuality+"&rand="+$rootScope.rand;
//console.log ("Setting event URL to " +$scope.MontageMonitors[j].Monitor.eventUrl);
// console.log ("SWITCHING TO " + $scope.MontageMonitors[j].eventUrl);
@@ -213,7 +213,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
if (!ZMDataModel.isBackground())
{
- $scope.MontageMonitors[i].Monitor.eventUrl=ld.streamingurl+"/nph-zms?source=event&mode=jpeg&event="+data.events[0].Event.Id+"&frame=1&replay=gapless&rate="+$scope.sliderVal.realRate+"&connkey="+$scope.MontageMonitors[i].Monitor.connKey+"&scale="+ld.singleImageQuality+"&rand="+$rootScope.rand;
+ $scope.MontageMonitors[i].Monitor.eventUrl=ld.streamingurl+"/nph-zms?source=event&mode=jpeg&event="+data.events[0].Event.Id+"&frame=1&replay=gapless&rate="+$scope.sliderVal.realRate+"&connkey="+$scope.MontageMonitors[i].Monitor.connKey+"&scale="+ld.montageHistoryQuality+"&rand="+$rootScope.rand;
@@ -442,7 +442,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
element.addClass('animated flipInX');
$scope.MontageMonitors[ndx].Monitor.eventUrlTime=data.event.Event.StartTime;
- $scope.MontageMonitors[ndx].Monitor.eventUrl=ld.streamingurl+"/nph-zms?source=event&mode=jpeg&event="+data.event.Event.Id+"&frame=1&replay=gapless&rate="+$scope.sliderVal.realRate+"&connkey="+$scope.MontageMonitors[ndx].Monitor.connKey+"&scale="+ld.singleImageQuality+"&rand="+$rootScope.rand;
+ $scope.MontageMonitors[ndx].Monitor.eventUrl=ld.streamingurl+"/nph-zms?source=event&mode=jpeg&event="+data.event.Event.Id+"&frame=1&replay=gapless&rate="+$scope.sliderVal.realRate+"&connkey="+$scope.MontageMonitors[ndx].Monitor.connKey+"&scale="+ld.montageHistoryQuality+"&rand="+$rootScope.rand;
},700);
}
diff --git a/www/js/app.js b/www/js/app.js
index dba5c28b..f18bbef6 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -1,6 +1,6 @@
/* jshint -W041 */
/* jslint browser: true*/
-/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI */
+/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI, $*/
var appVersion = "0.0.0";
@@ -151,6 +151,26 @@ angular.module('zmApp', [
})
+.directive('tooltip', function () {
+ return {
+ restrict: 'C',
+ link: function (scope, element, attrs) {
+ if (attrs.title) {
+ var $element = $(element);
+ $element.attr("title", attrs.title);
+ $element.tooltipster({
+ animation: attrs.animation,
+ trigger: "click",
+ position: "right",
+ positionTracker: true,
+ maxWidth: 500,
+ contentAsHTML: true
+ });
+ }
+ }
+ };
+})
+
//------------------------------------------------------------------
// I use this factory to share data between carousel and lazy load
diff --git a/www/templates/devoptions.html b/www/templates/devoptions.html
index 2ae803fb..4bc0bda0 100644
--- a/www/templates/devoptions.html
+++ b/www/templates/devoptions.html
@@ -68,13 +68,20 @@
</div>
<div class="item item-input-inset">
- Event image scale(%)&nbsp;
+ Event single image scale(%)&nbsp;
<label class="item-input-wrapper">
<input type="tel" placeholder="" ng-model="loginData.singleImageQuality">
</label>
</div>
<div class="item item-input-inset">
+ Event Montage image scale(%)&nbsp;
+ <label class="item-input-wrapper">
+ <input type="tel" placeholder="" ng-model="loginData.montageHistoryQuality">
+ </label>
+ </div>
+
+ <div class="item item-input-inset">
Max. items for Timeline&nbsp;
<label class="item-input-wrapper">
<input type="tel" placeholder="" ng-model="loginData.graphSize">
diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html
index e3a3e495..5a7991f8 100644
--- a/www/templates/events-modal.html
+++ b/www/templates/events-modal.html
@@ -41,9 +41,9 @@
<div ng-if="( (defaultVideo=='') || (loginData.enableh264==false)) && (loginData.useNphZmsForEvents==true)">
- <div style="color:white">connkey:{{connKey}}</div>
+ <!--<div style="color:white">connkey:{{connKey}}</div>-->
<div style="width:100vw; height:100vh" >
- <img ng-click="togglePause()" image-spinner-src="{{loginData.streamingurl}}/nph-zms?source=event&mode=jpeg&event={{eventId}}&frame=1&replay={{currentStreamMode}}&rate=100&connkey={{connKey}}&scale={{loginData.singleImageQuality}}{{$root.authSession}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}"/>
+ <img ng-click="togglePause()" image-spinner-src="{{loginData.streamingurl}}/nph-zms?source=event&mode=jpeg&event={{eventId}}&frame=1&replay={{currentStreamMode}}&rate=100&connkey={{connKey}}&scale={{singleImageQuality}}{{$root.authSession}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}"/>
<div ng-if="isPaused" style="position:absolute; top:50%; left:50%;white-space:nowrap;overflow:hidden;z-index:999"
class="header-paused">
@@ -121,8 +121,9 @@
<nav ng-if="loginData.useNphZmsForEvents" mfb-menu position="br" effect="zoomin" label="collapse" active-icon="ion-chevron-down" resting-icon="ion-chevron-up" toggling-method="click">
- <a mfb-button icon="ion-skip-forward" label="fast forward" ng-click="adjustSpeed('ff');"></a>
+
<a mfb-button icon="ion-skip-backward" label="fast rewind" ng-click="adjustSpeed('fr');"></a>
+ <a mfb-button icon="ion-skip-forward" label="fast forward" ng-click="adjustSpeed('ff');"></a>
<a mfb-button icon="ion-play" label="normal play" ng-click="adjustSpeed('np');"></a>
<a mfb-button icon="ion-pause" label="pause" ng-click="adjustSpeed('p');"> </a>
@@ -139,12 +140,9 @@
</div>
-<div class="events-range-modal" ng-if="(defaultVideo=='' )&& (loginData.useNphZmsForEvents)" style="color:white">
- <!-- Progress: Event: {{eventId}} - {{progressText}}-->
- <progress max="{{currentEventDuration}}" value="{{currentProgress}}"></progress>
-</div>
-<div class="events-range-modal-text" >showing event: {{eventId}}</div>
+
+<div class="events-range-modal-text" >showing event: {{d_eventId}}</div>
<span class="event-modal-alarm-badge">
<a data-badge="{{$root.alarmCount}}" class="animated infinite tada button icon ion-ios-bell notification-badge button-assertive button-small"
@@ -187,4 +185,16 @@
<progress max="{{totalEventTime}}" value="{{currentEventTime}}"
class="eventprogress"></progress>
-->
+
+ <div class="events-range-modal" ng-if="(defaultVideo=='' )&& (loginData.useNphZmsForEvents)" style="color:white">
+ <!-- Progress: Event: {{eventId}} - {{progressText}}-->
+ <div class="row">
+ <div class="col col-75">
+ <progress style="line-height:20px" max="{{currentEventDuration}}" value="{{currentProgress}}"></progress>
+ </div>
+ <div class="col col-25" style="line-height:40px">
+ @{{currentRate}}x
+ </div>
+ </div>
+</div>
</div> \ No newline at end of file