summaryrefslogtreecommitdiff
path: root/www/js/EventModalCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-11-22 12:25:58 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-11-22 12:25:58 -0400
commit4a973a83e0790cfee3fdc0dd46efd7ce71283b41 (patch)
treeffc30aa7535a2e9e55a8ba1bc4833010d4b61b6e /www/js/EventModalCtrl.js
parentfc9f5198166e500b85a217125157822a2f45921a (diff)
tweaks to video loading display and other cleanup #381
Diffstat (limited to 'www/js/EventModalCtrl.js')
-rw-r--r--www/js/EventModalCtrl.js12
1 files changed, 11 insertions, 1 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',