diff options
| -rw-r--r-- | www/js/EventModalCtrl.js | 12 | ||||
| -rw-r--r-- | www/lang/locale-en.json | 1 | ||||
| -rw-r--r-- | www/templates/events-modal.html | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 544bf127..67023fce 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -162,6 +162,14 @@ 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 + + + + $ionicLoading.show( + { + template: "<ion-spinner icon='ripple' class='spinner-energized'></ion-spinner><br/>" + $translate.instant('kVideoLoading')+"...", + + }); NVRDataModel.debug("Player is ready"); $timeout(function() { @@ -179,7 +187,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (currentEvent.Frame[l].Type=='Alarm') { var ft = moment(currentEvent.Frame[l].TimeStamp); - var s = st.diff(ft,'seconds'); + var s = Math.abs(st.diff(ft,'seconds')); //console.log("START="+currentEvent.Event.StartTime); //console.log("END="+currentEvent.Frame[l].TimeStamp); NVRDataModel.debug ("alarm cue at:"+s+"s"); @@ -194,11 +202,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.onCanPlay = function() { + $ionicLoading.hide(); NVRDataModel.debug("This video can be played"); }; $scope.onVideoError = function(event) { + $ionicLoading.hide(); if (!$scope.isModalActive) return; NVRDataModel.debug("player reported a video error:" + JSON.stringify(event)); $rootScope.zmPopup = SecuredPopups.show('alert', diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index fe6e82e2..008d5e06 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -344,6 +344,7 @@ "kVideo" :"Video", "kVideoError" : "Video not playable.", "kVideoErrorMobile" : "Video not playable. Try enabling 'force image path for events' in Dev Settings. The format may also be incompatible with a mobile system view", + "kVideoLoading" : "Loading Video", "kWake" :"Wake", "kWarningLargeTimeline" :"A large value can affect timeline performance. If you find timeline performance slow, try reducing the value to 200 and work your way up from there.", "kWeek" :"Week", diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index fe528561..c3dfc069 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -38,7 +38,7 @@ <vg-mute-button></vg-mute-button> </vg-volume> </vg-controls> - <!--<vg-buffering></vg-buffering>--> + </videogular> </div> </div> |
