Skip to content

Dalesjo/flowplayer-thumbnails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Flowplayer thumbnail image plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.0%
  • HTML 13.0%
  • Makefile 6.0%