Flowplayer thumbnail image plugin
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
.gitignore
LICENSE.md
Makefile
README.md
flowplayer.thumbnails.js
package.json

README.md

Flowplayer thumbnails plugin

This plugin displays preview thumbnail images on the timeline.

Usage

See: https://flowplayer.org/docs/plugins.html#thumbnails

Initialize player

flowplayer('#player', {
  ratio: 0.4167,
  clip: {
    title: 'Bauhaus',
    thumbnails: {
      template: 'thumbnails/bauhaus{time}.jpg',
      time_format: function (t) {
        // An example using left padding.
        var padding = "0000";
        var formatted_time = padding.substring(0, padding.length - t.toString().length) + t;
        return formatted_time + "-thumb.jpg";
      }
    },
    sources: [{
      type: 'video/webm',
      src: '//stream.flowplayer.org/bauhaus.webm'
    }, {
      type: 'video/mp4',
      src: '//stream.flowplayer.org/bauhaus.mp4'
    }]
  }
});

Demo

http://demos.flowplayer.org/api/thumbnails.html

CommonJS

The plugin can be used in a browserify and/or webpack environment with a commonjs loader:

var flowplayer = require('flowplayer'),
    plugin = require('flowplayer-thumbnails');

plugin(flowplayer); // plugin injects itself into Flowplayer

Building the plugin

Build requirement:

cd flowplayer-thumbnails
make deps
make