summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-07-19 16:47:04 -0400
committerPliable Pixels <pliablepixels@gmail.com>2019-07-19 16:47:04 -0400
commite8c2483e74b38b3d2f8a1d662574a23a6aabad64 (patch)
treeb02a2696d3fe5b1d219d40ed799887f865ca5bc7
parent88bdea176231fdc96db04bb41736ed177d52503a (diff)
don't play video on scrub if it was paused, disallow swipe for 1s if control bar was scrubbed
-rw-r--r--package.json4
-rw-r--r--www/js/EventModalCtrl.js10
-rw-r--r--www/templates/events-modal.html4
3 files changed, 13 insertions, 5 deletions
diff --git a/package.json b/package.json
index 1cb44ad7..26812d3f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "zmninjapro",
"description": "Home security mobile app for ZoneMinder",
- "version": "1.3.069",
+ "version":"1.3.069",
"displayName": "zmNinja",
"author": "Pliable Pixels",
"license": "custom see LICENSE.md",
@@ -192,4 +192,4 @@
]
}
}
-} \ No newline at end of file
+}
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index d5a410f9..c557ff6a 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -27,6 +27,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
//var isGlobalFid = false; // true if its set to MaxScoreFrameId in events
var eventId = 0;
var isSnapShotEnabled = false;
+ var playState = 'play'
@@ -197,6 +198,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$scope.onPlayerState = function (state) {
// parent scope
+ playState = state;
$scope.lastVideoStateTime.time = moment();
};
@@ -253,7 +255,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
var rate = NVR.getLogin().videoPlaybackSpeed;
NVR.debug ("Invoking play at rate:"+rate+" as video can be played");
handle.setPlayback (rate);
- handle.play();
+ if (playState== 'play') handle.play();
+
};
$scope.onVideoError = function (event) {
@@ -1533,6 +1536,11 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$scope.onSwipeEvent = function (eid, dirn) {
+ var diff = moment().diff($scope.lastVideoStateTime.time);
+ if (diff <= 1000) {
+ NVR.debug ("Not swiping, time interval was only:"+diff+" ms");
+ return;
+ }
//console.log("CALLED WITH " + eid + " dirn " + dirn);
if ($ionicScrollDelegate.$getByHandle("imgscroll").getScrollPosition().zoom != 1) {
//console.log("Image is zoomed in - not honoring swipe");
diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html
index 34ec051b..53ec2f61 100644
--- a/www/templates/events-modal.html
+++ b/www/templates/events-modal.html
@@ -77,7 +77,7 @@
vg-update-time="videoTime(event.Event.StartTime,$currentTime)" vg-error="onVideoError($event)">
<vg-media vg-src="videoObject.config.sources" vg-native-controls="videoObject.config.nativeControls">
</vg-media>
- <vg-controls>
+ <vg-controls >
<vg-playback-button></vg-playback-button>
<vg-play-pause-button></vg-play-pause-button>
<vg-time-display>{{ videoTime(event.Event.StartTime, currentTime ); }}</vg-time-display>
@@ -131,7 +131,7 @@
<div ng-show="!liveFeedMid">
- <nav mfb-menu position="br" effect="zoomin" label="{{'kCollapse'|translate}}" active-icon="ion-chevron-down"
+ <nav mfb-menu position="tr" effect="zoomin" label="{{'kCollapse'|translate}}" active-icon="ion-chevron-down"
resting-icon="ion-chevron-up" toggling-method="click">
<a mfb-button icon="ion-arrow-right-c" label="{{'kNextEvent'|translate}}" ng-click="jumpToEvent(nextId,1);"></a>
<a mfb-button icon="ion-arrow-left-c" label="{{'kPrevEvent'|translate}}" ng-click="jumpToEvent(prevId,-1);"></a>