diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2020-02-22 16:23:31 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2020-02-22 16:23:31 -0500 |
| commit | 922f98c3e4cf004e01d0f81b5e6500731ad085e7 (patch) | |
| tree | 2dd6691ac043d843253db383fc2086df78c124b9 /www | |
| parent | 15fbabb40520ab898a2be9eecf588aac8a1ba882 (diff) | |
#897 fix: overlay css, move cue code to canPlay, convert cue points to float to avoid exceptions
Diffstat (limited to 'www')
| -rw-r--r-- | www/css/style.css | 8 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 63 | ||||
| -rw-r--r-- | www/js/NVR.js | 2 | ||||
| -rwxr-xr-x | www/js/app.js | 2 |
4 files changed, 46 insertions, 29 deletions
diff --git a/www/css/style.css b/www/css/style.css index 6d009c9b..49b608c1 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -1087,6 +1087,14 @@ videogular div.event-time { background: rgba(255, 0, 0, 0.5); } +videogular vg-scrub-bar { + z-index:100 !important; +} + +videogular vg-cue-points vg-cue-point { + z-index:99 !important; +} + #full-screen-event { -webkit-animation-duration: 200ms; animation-duration: 200ms; diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index f83c5893..34b41dc3 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -117,7 +117,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $timeout(function () { var keyCode = evt.keyCode; - console.log(keyCode + " PRESSED"); + //console.log(keyCode + " PRESSED"); if (keyCode == keyCodes.ESC) { @@ -203,6 +203,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.onPlayerState = function (state) { // parent scope + NVR.debug ("Video state="+state); playState = state; $scope.lastVideoStateTime.time = moment(); }; @@ -211,31 +212,10 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro // we need this timeout to avoid load interrupting // play -- I suppose its an angular digest foo thing - //console.log ("*********** ON PLAY READY"); NVR.debug("On Play Ready invoked"); handle = api; handle.mediaElement.attr("playsinline", ""); - $ionicLoading.show({ - template: "<ion-spinner icon='ripple' class='spinner-energized'></ion-spinner><br/>" + $translate.instant('kVideoLoading') + "...", - - }); - - - }; - - $scope.onPlaybackUpdate = function (rate) { - //console.log ("UPDATED RATE TO "+rate); - var ld = NVR.getLogin(); - ld.videoPlaybackSpeed = rate; - NVR.setLogin(ld); - }; - - $scope.onCanPlay = function () { - - //console.log ("*********** CAN PLAY"); - $ionicLoading.hide(); - NVR.debug("This video can be played"); $scope.videoObject.config.cuepoints.points = []; // now set up cue points NVR.debug("Setting cue points.."); @@ -251,17 +231,46 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro //console.log("START="+currentEvent.Event.StartTime); //console.log("END="+currentEvent.Frame[l].TimeStamp); - //NVR.debug ("alarm cue at:"+s+"s"); + //console.log ("alarm cue at:"+s+"s"); $scope.videoObject.config.cuepoints.points.push({ - time: s + time: parseFloat(s) }); } } + + $ionicLoading.show({ + template: "<ion-spinner icon='ripple' class='spinner-energized'></ion-spinner><br/>" + $translate.instant('kVideoLoading') + "...", + + }); + + + }; + + $scope.onPlaybackUpdate = function (rate) { + + + var ld = NVR.getLogin(); + if (ld.videoPlaybackSpeed != rate) { + NVR.debug ("Update video rate to:"+rate); + ld.videoPlaybackSpeed = rate; + } + + NVR.setLogin(ld); + }; + + $scope.onCanPlay = function () { + + $ionicLoading.hide(); + NVR.debug("This video can be played"); + var rate = NVR.getLogin().videoPlaybackSpeed; - NVR.debug ("Invoking play at rate:"+rate+" as video can be played"); + handle.setPlayback (rate); - if (playState== 'play') handle.play(); + if (playState== 'play') { + NVR.debug ("Setting play at rate:"+rate+" as video can be played"); + handle.play(); + } }; $scope.onVideoError = function (event) { @@ -1077,7 +1086,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.showHideControls = function () { $scope.displayControls = !$scope.displayControls; - NVR.debug ('control display is:'+$scope.displayControls); + NVR.debug ('display overlays:'+$scope.displayControls); }; $scope.$on('modal.shown', function (e, m) { diff --git a/www/js/NVR.js b/www/js/NVR.js index a53e0587..ef94d5b3 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -21,7 +21,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.3.088"; + var zmAppVersion = "1.3.089"; var isBackground = false; var justResumed = false; diff --git a/www/js/app.js b/www/js/app.js index ebe73e8c..73b50511 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -2039,7 +2039,7 @@ angular.module('zmApp', [ //$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|cdvphotolibrary):/); $compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|content|cdvphotolibrary|blob|unsafe|local):|data:image\//); - $provide.decorator("$exceptionHandler", ['$delegate', '$injector', function ($delegate, $injector) { + $provide.decorator("$exceptionHandler", ['$delegate', '$injector', function ($delegate, $injector) { return function (exception, cause) { var $rootScope = $injector.get("$rootScope"); |
