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

placing custom markers on the progress bar #278

Open
frumbert opened this issue Jun 16, 2016 · 12 comments
Open

placing custom markers on the progress bar #278

frumbert opened this issue Jun 16, 2016 · 12 comments
Labels
Milestone

Comments

@frumbert
Copy link

Is there a suggested way for me to place markers (in my case chapters) over the progress bar at the correct positions in time? I'm planning on just using positioned divs or svg elements.

@1ucay
Copy link

1ucay commented Oct 6, 2016

it would be awesome, if I can define own timeline (cue point, chapter).

@friday friday added the Feature label May 25, 2018
@friday friday added this to the Undecided milestone Jun 8, 2018
@mikecx
Copy link

mikecx commented Jul 11, 2018

Adding on to this request, being able to use those cuepoints as start-end markers and being draggable would make this amazing. We're building a video trimming library and having those cuepoints would make it so much easier.

@benrolfe
Copy link

MP3 files can have chapters. It would be great to have a list of chapters to "jump to".

@advename
Copy link

advename commented Mar 9, 2021

Any update on this?

@carbonrider
Copy link

I am also looking for this feature, is there any update? OR has anyone achieved with custom plugin?

@zamoosh
Copy link

zamoosh commented Sep 20, 2022

I wish there was a method so we can set markers on progress bar.

@carbonrider
Copy link

@zamoosh I could place markers on progress bar with my own code.

@zamoosh
Copy link

zamoosh commented Sep 21, 2022

@zamoosh I could place markers on progress bar with my own code.

Would you please share your code?

@carbonrider
Copy link

I will have to check if I can share the code. But here are few hints

  1. Create a new plugin for Plyr and pass plyr instance to it.
  2. Invoke an initialize function
    a. Locate a HTML element using class selector - .plyr__progress
    b. Create a div element and add it to the above element. (Make sure to set its display to contents and pointer events to none)
    c. Inside the div element created in step 2, create markers you want. Each marker can be placed at absolute position using const percent = (parseFloat(item.start) / this.plyr.duration) * 100;
    d. Make sure that each of these marker should also have pointer events set to none. This should allow user to drag thumb tracker in progress bar.

@zamoosh
Copy link

zamoosh commented Sep 22, 2022

@carbonrider Please check here 👇. I found the answer.

ClassHook#8 (comment)

@carbonrider
Copy link

@carbonrider Please check here 👇. I found the answer.

ClassHook#8 (comment)

That's really cool. Since I had to put the feature in production, I had to write my own plugin. Anyways, thanks for pointing out the link.

@zamoosh
Copy link

zamoosh commented Sep 23, 2022

@carbonrider Happy to help yogesh!👌🙂
also I have directory named Plyr in my account that have some feature maybe u like! It's on add_marker_completed branch. please see that and tell your opinion...

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

No branches or pull requests

8 participants