pthumbnails
v1.2.0
Published
Thumbnails on progress bar hover/videojs scrubbing, using VTT files.
Downloads
1,028
Readme
videojs-vtt-thumbnails
Video.js plugin that displays thumbnails on progress bar hover, driven by external VTT files. Based on this JW Player spec.
This plugin supports both sprited and single images. If more than one image is given per second, a single image among them will be used.
Table of Contents
Installation
Installation
npm install --save videojs-vtt-thumbnails
Usage
To include videojs-vtt-thumbnails on your website or web application, use any of the following methods.
<script>
Tag
This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs
global is available. Don't forget to include the CSS file too.
<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-vtt-thumbnails.min.js"></script>
<script>
var player = videojs('my-video')
player.vttThumbnails({
src: 'example/thumbs.vtt',
baseUrl: 'http://localhost:9000' // optional. if not, example/ will be used as baseUrl, if the .vtt sub-files are not FQ URLs.
})
</script>
License
MIT. Copyright (c) Chris Boustead <[email protected]>