summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rwxr-xr-xwww/js/DataModel.js12
-rw-r--r--www/js/EventModalCtrl.js10
-rw-r--r--www/templates/events-modal.html4
3 files changed, 22 insertions, 4 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 28372d56..51773a9d 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -148,7 +148,8 @@ angular.module('zmApp.controllers')
'fastLogin': true,
'followTimeLine': false,
'timelineScale': -1,
- 'hideArchived': false
+ 'hideArchived': false,
+ 'videoPlaybackSpeed': 2,
};
@@ -559,7 +560,7 @@ angular.module('zmApp.controllers')
{
//console.log ("************* AUGH");
- return $http({method:'GET', timeout:5000, url:urls[0].url}).then(function()
+ return $http({method:'GET', timeout:15000, url:urls[0].url}).then(function()
{
log("Success: reachability on " + urls[0].url);
$ionicLoading.hide();
@@ -978,6 +979,13 @@ angular.module('zmApp.controllers')
}
+ if (typeof loginData.videoPlaybackSpeed == 'undefined')
+ {
+
+ loginData.videoPlaybackSpeed = 2;
+
+ }
+
log("DataModel init recovered this loginData as " + JSON.stringify(loginData));
}
else
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index d899e7e8..f1953c5d 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -175,7 +175,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$timeout(function()
{
handle.pause();
- handle.setPlayback(2);
+ handle.setPlayback(NVRDataModel.getLogin().videoPlaybackSpeed);
handle.play();
}, 300);
@@ -183,6 +183,14 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
// window.stop();
};
+ $scope.onPlaybackUpdate = function(rate)
+ {
+ console.log ("UPDATED RATE TO "+rate);
+ var ld = NVRDataModel.getLogin();
+ ld.videoPlaybackSpeed = rate;
+ NVRDataModel.setLogin(ld);
+ };
+
$scope.onCanPlay = function()
{
diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html
index d01c948d..2e916f57 100644
--- a/www/templates/events-modal.html
+++ b/www/templates/events-modal.html
@@ -19,7 +19,9 @@
<div ng-if="defaultVideo!==undefined && defaultVideo!='' && loginData.enableh264 == true">
<div ng-if="videoIsReady">
<div style="height:{{$root.devHeight}}px; width:{{$root.devWidth}}px;">
- <videogular vg-error="onVideoError($event)" vg-can-play="onCanPlay()" vg-native-fullscreen="videoObject.config.nativeFullScreen" vg-player-ready="onPlayerReady($API)" vg-plays-inline="videoObject.config.playsInline" vg-theme="videoObject.config.theme" vg-complete="playbackFinished()" on-double-tap="closeModal();" vg-autoplay="videoObject.config.autoPlay" vg-responsive="videoObject.config.responsive" vg-update-time="videoTime(event.Event.StartTime,$currentTime)">
+ <videogular vg-error="onVideoError($event)" vg-can-play="onCanPlay()" vg-native-fullscreen="videoObject.config.nativeFullScreen" vg-player-ready="onPlayerReady($API)"
+ vg-update-playback="onPlaybackUpdate($playBack)"
+ vg-plays-inline="videoObject.config.playsInline" vg-theme="videoObject.config.theme" vg-complete="playbackFinished()" on-double-tap="closeModal();" vg-autoplay="videoObject.config.autoPlay" vg-responsive="videoObject.config.responsive" vg-update-time="videoTime(event.Event.StartTime,$currentTime)">
<vg-media vg-src="videoObject.config.sources" vg-native-controls="videoObject.config.nativeControls">
</vg-media>
<vg-controls>