Trivial suggestion: add a checkbox to apply auto replay / loop
andy-shi88 opened this issue · 2 comments
andy-shi88 commented
It's really a trivial feature I think some of us would like to have.
- Able to control wether to stop a song or just auto replay [infinite loop] the song by one simple checkbox when the song ended.
by the way, the app is really interesting.
Let me know what you think
shakeelmohamed commented
Thanks for the suggestion @andy-shi88! If you want to submit a PR I'm happy to review it.
In the timeupdate
event listener (around line 218 in js/everything.js
) we'd just need to compare plyrPlayer.plyr.embed.getCurrentTime()
with plyrPlayer.plyr.embed.getDuration()
. When the current time is the duration, we can set the current time to 0 with plyrPlayer.plyr.embed.seekTo(0)
.
andy-shi88 commented
@shakeelmohamed ok, I'll start working on it 😄