From e337593cc65dac19eeb29fc99b7def02fdbc55ed Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Thu, 5 May 2016 11:45:19 -0400 Subject: #241 - lots of fixes, now switching between fid=XXX and path=YYYY mode depending on API version and other muti-server fixes Former-commit-id: 57ace2fa05175a07a5565c24820f5f56c6cfd2e0 --- www/js/EventModalCtrl.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'www/js/EventModalCtrl.js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 726cbc04..88c0c2ed 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -706,6 +706,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (m.id != 'footage') return; + //console.log ("************** MODAL INSIDE FOOTAGE CLOSED"); $scope.isModalActive = false; //console.log("**MODAL REMOVED: Stopping modal timer"); @@ -1194,7 +1195,14 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro event.Event.video = {}; - var videoURL = $scope.loginData.url + "/events/" + event.Event.relativePath + event.Event.DefaultVideo; + var videoURL; + + if (event.Event.imageMode == 'path') + videoURL = event.Event.baseURL + "/events/" + event.Event.relativePath + event.Event.DefaultVideo; + else + videoURL = event.Event.baseURL + "/index.php?view=view_video&eid="+event.Event.Id; + + console.log("************** VIDEO IS " + videoURL); //console.log("************** VIDEO IS " + videoURL); event.Event.video.config = { @@ -1328,24 +1336,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (typeof $scope.mycarousel !== 'undefined') { $scope.$watch('mycarousel.index', function () { - - - - // console.log ("***ION MYCAROUSEL CHANGED TO " + $scope.mycarousel.index); - - //console.log ("*** IONRANGE INDEX IS " + $scope.ionRange.index); - - // console.log ("**** CURRENT EVENT frames" + currentEvent.Event.Frames); - + if (currentEvent && $scope.ionRange.index == parseInt(currentEvent.Event.Frames -1)) { - // console.log ("PLAYBACK FINISHED"); playbackFinished(); } // end of playback from quick scrub // so ignore gapless - - if ($scope.event && $scope.ionRange.index == parseInt($scope.event.Event.Frames) - 1) { if (!$scope.modal || $scope.modal.isShown() == false) { // console.log("quick scrub playback over"); -- cgit v1.2.3