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

Adjust timing/offset of Lyrics. #25

Open
sugoidesune opened this issue Mar 5, 2021 · 0 comments
Open

Adjust timing/offset of Lyrics. #25

sugoidesune opened this issue Mar 5, 2021 · 0 comments

Comments

@sugoidesune
Copy link

sugoidesune commented Mar 5, 2021

I would like to adjust the timing of the lyrics.
Play lyrics earlier/later a so called Offset.

Use case:

  • The MP3 has a bad cut and long silent intro.
  • I would like to add CSS animations to the lyrics, but I need the class to appear 0.5s sooner.

I know I could adjust the lyrics. But it would be much much simpler to just add it via JS or data attribute.

<div class="rabbit-lyrics" data-offset="-2000" data-media="#audio-1">
new RabbitLyrics({
    element: document.findElementById('lyrics-1'),
    mediaElement: document.findElementById('audio-1'),
   offset: -2000 // play lyrics 2 seconds earlier.
})

Great project so far!

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

No branches or pull requests

1 participant