pthumbnails

1.2.0 • Public • Published

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>

Readme

Keywords

Package Sidebar

Install

npm i pthumbnails

Weekly Downloads

395

Version

1.2.0

License

MIT

Unpacked Size

105 kB

Total Files

21

Last publish

Collaborators

  • rigelk