Video.js: Adding markers on Video progress bar

Created on 17 Sep 2013  Â·  11Comments  Â·  Source: videojs/video.js

I see there are plugins to add thumbnail preview when hovering on the video progress bar, but I don't find any ways to put customizable markers upon progress bars like the ones shown in the picture. This is necessary to show some breaks in the video.

screen shot 2013-09-16 at 3 36 48 pm

I'll go ahead and make a plugin for this feature.

plugin

Most helpful comment

Hi Just for an update, I made a plugin to display markers on the player bar
https://github.com/spchuang/videojs-markers

All 11 comments

Sounds great!

Feel free to ask any question about the process here.

Is it a better idea to use pure javascript or have plugin written with jquery syntax

If you can manage without jquery that'd be best since video.js doesn't require it, but you don't have to.

Is there a way to retrieve the id of the video div? I noticed that in 4.0, the div is defined in player.L and in 4.2 it's in player.a

Id is one of the many methods that gets obfuscated to save file size. We can export it in the next version if it's needed. The ID of the DIV is the same as the ID that you use for the video tag embed, if that helps.

Also you can get the div through myPlayer.el();

On Sep 19, 2013, at 3:09 PM, spchuang [email protected] wrote:

Is there a way to retrieve the id of the video div? I noticed that in 4.0, the div is defined in player.L and in 4.2 it's in player.a

—
Reply to this email directly or view it on GitHub.

You can retrieve just the id through myPlayer.id() as well.

Heh, good catch. I was assuming id was obfuscated because it wasn't in the exports file, but since it's a native property it's protected.

Hi Just for an update, I made a plugin to display markers on the player bar
https://github.com/spchuang/videojs-markers

Very cool! That will be a handy plugin. Thanks for adding.

I really appreciate you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

d3x7r0 picture d3x7r0  Â·  4Comments

askaliuk picture askaliuk  Â·  3Comments

aagiulian picture aagiulian  Â·  3Comments

pblasi picture pblasi  Â·  3Comments

SolmazKh picture SolmazKh  Â·  4Comments