diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-11-19 17:02:36 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-11-19 17:02:36 -0500 |
| commit | 76b17d856fe7ce6ccaa377e31a53a733920548df (patch) | |
| tree | f7eccc07d51b3b69f51cc4be9ccad490684748a1 /www | |
| parent | 5d69f02c6b8b40047daa5670a812f5965e8a3121 (diff) | |
added playback rate control 1,1.5,2x. #382
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 2 | ||||
| -rw-r--r-- | www/templates/events-modal.html | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 60987392..98557f7a 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1,6 +1,6 @@ /* jshint -W041 */ /* jslint browser: true*/ -/* global saveAs, cordova,StatusBar,angular,console,moment, MobileAccessibility, gifshot */ +/* global saveAs, cordova,StatusBar,angular,console,moment, MobileAccessibility, gifshot, AnimatedGIF */ // This is the controller for Event view. StateParams is if I recall the monitor ID. // This was before I got access to the new APIs. FIXME: Revisit this code to see what I am doing with it @@ -961,6 +961,7 @@ angular.module('zmApp.controllers') var ad = adjustAspect(e); console.log("SAVING W=" + ad.w + " H=" + ad.h); + //AnimatedGIF.setRepeat(null); gifshot.createGIF( { //'images': ['http://i.imgur.com/2OO33vX.jpg', 'http://i.imgur.com/qOwVaSN.png', 'http://i.imgur.com/Vo5mFZJ.gif'], @@ -968,6 +969,7 @@ angular.module('zmApp.controllers') 'gifHeight': ad.h, 'images': imgs, 'interval':1, + //'loop':null, 'sampleInterval':20, //'frameDur':5, // 1/2 a sec 'text': 'zmNinja', diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 5773c5ef..62609e5a 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -163,7 +163,9 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro NVRDataModel.debug("Player is ready"); $timeout(function() { + handle.setPlayback(2); handle.play(); + }, 400); // window.stop(); diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 8ed518c2..ddb954c3 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -19,10 +19,11 @@ <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-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-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)"> <vg-media vg-src="videoObject.config.sources" vg-native-controls="videoObject.config.nativeControls"> </vg-media> <vg-controls> + <vg-playback-button></vg-playback-button> <vg-play-pause-button></vg-play-pause-button> <vg-time-display>{{ videoTime(event.Event.StartTime, currentTime ); }}</vg-time-display> <vg-scrub-bar> @@ -67,7 +68,7 @@ <a mfb-button icon="ion-arrow-resize" label="{{imageFit?'fill screen':'fit screen'}}" ng-click="scaleImage();"></a> <a mfb-button icon="ion-close" label="{{'kExitEventView' | translate}}" ng-click="closeModal()"> </a> </nav> - <nav ng-if="loginData.useNphZmsForEvents" mfb-menu position="br" effect="zoomin" label="collapse" active-icon="ion-chevron-down" resting-icon="ion-chevron-up" toggling-method="click"> + <nav ng-if="loginData.useNphZmsForEvents && defaultVideo==''" mfb-menu position="br" effect="zoomin" label="collapse" active-icon="ion-chevron-down" resting-icon="ion-chevron-up" toggling-method="click"> <a mfb-button icon="ion-skip-backward" label="{{'kFastRewind'|translate}}" ng-click="adjustSpeed('fr');"></a> <a mfb-button icon="ion-skip-forward" label="{{'kFastForward'|translate}}" ng-click="adjustSpeed('ff');"></a> <a mfb-button icon="ion-play" label="{{'kNormalPlay'|translate}}" ng-click="adjustSpeed('np');"></a> |
