Skip to content

rigelk/videojs-vtt-thumbnails

 
 

Repository files navigation

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 <chris@forgemotion.com>

About

Video.js plugin that displays thumbnails on progress bar hover, driven by external VTT files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 89.2%
  • HTML 8.1%
  • CSS 2.7%