Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using VTT file for thumbnails #12

Open
PooriaFarhad opened this issue Apr 18, 2016 · 6 comments
Open

Using VTT file for thumbnails #12

PooriaFarhad opened this issue Apr 18, 2016 · 6 comments

Comments

@PooriaFarhad
Copy link

It could be great to use VTT file as source of thumbnails.
VTT sample file:
http://vedas.ir/thumbnails.vtt

and also a better choice could be sprite sheet:
http://vedas.ir/thumbnails-sheet.vtt
http://vedas.ir/thumbnails.jpg

Hmmm?

Thanks

@leandromoreira
Copy link

For those that don't want to download the file, here it is:

WEBVTT

00:00:00.000 --> 00:00:10.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0001.jpg

00:00:10.000 --> 00:00:20.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0002.jpg

00:00:20.000 --> 00:00:30.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0003.jpg

00:00:30.000 --> 00:00:40.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0004.jpg

00:00:40.000 --> 00:00:50.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0005.jpg

00:00:50.000 --> 00:01:00.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0006.jpg

00:01:00.000 --> 00:01:10.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0007.jpg

00:01:10.000 --> 00:01:20.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0008.jpg

00:01:20.000 --> 00:01:30.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0009.jpg

00:01:30.000 --> 00:01:40.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0010.jpg

00:01:40.000 --> 00:01:50.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0011.jpg

00:01:50.000 --> 00:02:00.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0012.jpg

00:02:00.000 --> 00:02:10.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0013.jpg

00:02:10.000 --> 00:02:20.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0014.jpg

00:02:20.000 --> 00:02:30.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0015.jpg

00:02:30.000 --> 00:02:40.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0016.jpg

00:02:40.000 --> 00:02:50.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0017.jpg

00:02:50.000 --> 00:03:00.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0018.jpg

00:03:00.000 --> 00:03:10.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0019.jpg

00:03:10.000 --> 00:03:20.000
thumbnails/g5yulblomzgq3teclzctcaif2xabo2feis3eevoo_720-0020.jpg

@PooriaFarhad
Copy link
Author

is it possible to use them for current plugin?

@tjenkinson
Copy link
Owner

Hi @PooriaFarhad VTT's are not currently supported but sprite sheets are.

To use your sprite sheet you would do this:

var numThumbs = 20;
var thumbWidth = 120;
var thumbHeight = 68;
var numColumns = 10;
var timeInterval = 5; // TODO change this to your value

var thumbsConfig = ClapprThumbnailsPlugin.buildSpriteConfig("http://vedas.ir/thumbnails.jpg", numThumbs, thumbWidth, thumbHeight, numColumns, timeInterval);

var player = new Clappr.Player({
  source: "http://your.video/here.mp4",
  plugins: {
    core: [ClapprThumbnailsPlugin]
  },
  scrubThumbnails: {
    backdropHeight: 64,
    spotlightHeight: 84,
    thumbs: thumbsConfig
  }
});

@PooriaFarhad
Copy link
Author

are you going to add it?

@PooriaFarhad
Copy link
Author

hmmm?

@tjenkinson
Copy link
Owner

Sorry I'm really busy at the moment. It sounds like nice feature and possible at the moment if you parse the file yourself to generate the config from. This looks like it should be able to parse a vtt on the common browsers: https://github.com/mozilla/vtt.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants