Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pthumbnails with all npm packages installed. Try it out:

var pthumbnails = require("pthumbnails")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pthumbnails v1.2.0

Thumbnails on progress bar hover/videojs scrubbing, using VTT files.

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>

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free