diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2019-04-02 10:49:25 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2019-04-02 10:49:25 -0400 |
| commit | 54a54a2907cbf8f07cab2c05dd478570c78cf3f1 (patch) | |
| tree | 18dd08033f2d96ab48f7634480bf306a82f68203 /www/js | |
| parent | 29ac5329274d129b3c85eeda480048c6c7687cc5 (diff) | |
#801 final cleanups, some test aut stuff too
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 23 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 23 | ||||
| -rwxr-xr-x | www/js/app.js | 3 |
3 files changed, 24 insertions, 25 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index a7ba3128..15ae11df 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -67,6 +67,9 @@ angular.module('zmApp.controllers') var eventsListScrubHeight = eventsListScrubHeight; var eventsListDetailsHeight = eventsListDetailsHeight; + var eHandle; + var scrubOngoing = false; + //--------------------------------------------------- // initial code @@ -149,6 +152,9 @@ angular.module('zmApp.controllers') else if ($scope.modal != undefined && $scope.modal.isShown()) { NVR.debug ("Not reloading as you have a modal open"); } + else if (scrubOngoing) { + NVR.debug ("Not reloading, as video scrub is on"); + } else { doRefresh(); } @@ -825,11 +831,18 @@ angular.module('zmApp.controllers') $scope.readyToPlay = function (api) { - api.mediaElement.attr("playsinline", ""); + eHandle = api; + eHandle.mediaElement.attr("playsinline", ""); }; + $scope.eventCanPlay = function() { + NVR.debug("This video can be played"); + eHandle.play(); + + }; + $scope.downloadFileToDevice = function (path, eid) { @@ -2109,6 +2122,11 @@ angular.module('zmApp.controllers') scrollbynumber = 0; } + if (scrubOngoing) { + NVR.debug ("making sure scrub is off"); + scrubOngoing = false; + } + if (oldEvent && event != oldEvent) { NVR.debug("EventCtrl:Old event scrub will hide now"); @@ -2207,6 +2225,7 @@ angular.module('zmApp.controllers') { NVR.debug("EventCtrl: Scrubbing will turn on now"); + scrubOngoing = true; $scope.currentEvent = ""; $scope.event = event; //$ionicScrollDelegate.freezeScroll(true); @@ -2313,7 +2332,7 @@ angular.module('zmApp.controllers') ], - theme: "lib/videogular-themes-default/videogular.css", + theme: "external/videogular2.2.1/videogular.min.css", }; diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index c025cd3d..f22f6dc0 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -208,28 +208,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro }); - $timeout(function () { - // NVR.debug("Player is ready, invoking play"); - // handle.play() - - /* - .then (function (succ) { - NVR.debug ("Pause completed, doing a play"); - handle.play(); - }) - .catch (function (err) { - NVR.log ('Error invoking promised pause ' + JSON.stringify(err), 'error'); - })*/ - - /*playerPromise - .then (function (succ) {NVR.debug ("video should be playing");}) - .catch ( function (err) { - NVR.log ('Error trying to play: '+JSON.stringify(err), 'error'); - });*/ - - }, 300); - - // window.stop(); + }; $scope.onPlaybackUpdate = function (rate) { diff --git a/www/js/app.js b/www/js/app.js index af63f450..7c03fbdd 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -701,8 +701,9 @@ angular.module('zmApp', [ if (response.data && typeof(response.data) == 'string' && response.data.startsWith("<pre class=\"cake-error\">")) { console.log ("cake error detected, attempting fix..."); + //console.log ("BAD = "+ JSON.stringify(response.data)); response.data = JSON.parse(response.data.replace(/<pre class=\"cake-error\">[\s\S]*<\/pre>/,'')); - //console.log ("FIXED="+response.data); + // console.log ("FIXED="+JSON.stringify(response.data)); } //"data":"<pre class=\"cake-error\"> return response; |
