summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-02-22 16:23:31 -0500
committerPliable Pixels <pliablepixels@gmail.com>2020-02-22 16:23:31 -0500
commit922f98c3e4cf004e01d0f81b5e6500731ad085e7 (patch)
tree2dd6691ac043d843253db383fc2086df78c124b9 /www/js
parent15fbabb40520ab898a2be9eecf588aac8a1ba882 (diff)
#897 fix: overlay css, move cue code to canPlay, convert cue points to float to avoid exceptions
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventModalCtrl.js63
-rw-r--r--www/js/NVR.js2
-rwxr-xr-xwww/js/app.js2
3 files changed, 38 insertions, 29 deletions
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");