From 8f9d87bbc90bec00c3497c42b52c0cb4b29ddcc1 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Thu, 5 Nov 2015 10:09:11 -0500 Subject: gapless playback control as well as control for image quality in event view --- www/js/EventCtrl.js | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) (limited to 'www/js/EventCtrl.js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 5e9cff09..0f16ed31 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -657,21 +657,30 @@ angular.module('zmApp.controllers') { // currentEvent is updated with the currently playing event in prepareModalEvent() ZMDataModel.zmLog ("Playback of event " + currentEvent.Event.Id + " is finished"); - neighborEvents(currentEvent.Event.Id) - .then(function (success) { - - // lets give a second before gapless transition to the next event - $timeout ( function() { - $scope.nextId = success.next; - $scope.prevId = success.prev; - ZMDataModel.zmDebug ("Gapless move to event " + $scope.nextId); - jumpToEvent($scope.nextId, 1); - },1000); - }, - function (error) { - ZMDataModel.zmDebug("Error in neighbor call " + JSON.stringify(error)); - }); + if ($scope.loginData.gapless) + { + + neighborEvents(currentEvent.Event.Id) + .then(function (success) { + + // lets give a second before gapless transition to the next event + $timeout ( function() { + $scope.nextId = success.next; + $scope.prevId = success.prev; + ZMDataModel.zmDebug ("Gapless move to event " + $scope.nextId); + jumpToEvent($scope.nextId, 1); + },1000); + }, + function (error) { + ZMDataModel.zmDebug("Error in neighbor call " + + JSON.stringify(error)); + }); + } + else + { + ZMDataModel.zmDebug ("not going to next event, gapless is off"); + } } //------------------------------------------------------------------------- @@ -1226,7 +1235,14 @@ angular.module('zmApp.controllers') } - + $scope.toggleGapless = function() + { + + $scope.loginData.gapless = !$scope.loginData.gapless; + ZMDataModel.setLogin($scope.loginData); + + }; + //-------------------------------------------------------- //Navigate to next/prev event in full screen mode //-------------------------------------------------------- -- cgit v1.2.3