diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-05 10:09:11 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-05 10:09:11 -0500 |
| commit | 8f9d87bbc90bec00c3497c42b52c0cb4b29ddcc1 (patch) | |
| tree | 4da6ed92566fd2282751b79d4a53e4291094a657 /www/js/EventCtrl.js | |
| parent | 45bd88bd0cca44512f3697a348aab2089ac8139f (diff) | |
gapless playback control as well as control for image quality in event view
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 46 |
1 files changed, 31 insertions, 15 deletions
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 //-------------------------------------------------------- |
