forked from Github/frigate
add playback rate adjustment and seek buttons
This commit is contained in:
committed by
Blake Blackshear
parent
7b3abe330e
commit
40c4ca305e
@@ -1,10 +1,13 @@
|
||||
import { h, Component } from 'preact';
|
||||
import videojs from 'video.js';
|
||||
import 'videojs-playlist';
|
||||
import 'videojs-seek-buttons';
|
||||
import 'video.js/dist/video-js.css';
|
||||
import 'videojs-seek-buttons/dist/videojs-seek-buttons.css';
|
||||
|
||||
const defaultOptions = {
|
||||
controls: true,
|
||||
playbackRates: [0.5, 1, 2, 4, 8],
|
||||
fluid: true,
|
||||
};
|
||||
|
||||
@@ -18,6 +21,10 @@ export default class VideoPlayer extends Component {
|
||||
this.player = videojs(this.videoNode, videoJsOptions, function onPlayerReady() {
|
||||
onReady(this);
|
||||
});
|
||||
this.player.seekButtons({
|
||||
forward: 30,
|
||||
back: 15,
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
||||
Reference in New Issue
Block a user