summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/EventModalCtrl.js10
-rw-r--r--www/templates/events-modal.html4
2 files changed, 11 insertions, 3 deletions
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>