zen-audio-player.github.io icon indicating copy to clipboard operation
zen-audio-player.github.io copied to clipboard

Repeat track does not repeat when clicking towards end of song

Open k----n opened this issue 5 years ago • 9 comments

Bug/issue:

  • [x] Start playing the song
  • [x] Activate the repeat track function
  • [x] Click towards very end of the song
  • [x] Song will not repeat

k----n avatar Oct 05 '19 06:10 k----n

@shakeelmohamed I have started working on this...

vandanmshah avatar Oct 25 '19 20:10 vandanmshah

@vandanmshah Please look at my PR #328 first and see if it's fixed. I think it's been solved, but it just hasn't been really tested yet.

k----n avatar Oct 26 '19 00:10 k----n

@k----n Checked your fix and i am not sure this will work because actually the problem is once you end the player explicitly it loses the timeupdate EventListener, so after that this code is not going to execute, but will take your branch in local and will test it...

vandanmshah avatar Oct 26 '19 01:10 vandanmshah

@vandanmshah Okay, I see what you mean. I added something for the 'ended' EventListener and enabled/disabled plyr's 'loop' option, and it seems to sort of fix it. I feel like some of the code isn't needed though...

What's not working now is that when you try to reproduce this bug, the play/pause doesn't update sometimes.

Let me know how your fix goes, interested in knowing what the outcome is!

k----n avatar Oct 26 '19 02:10 k----n

@k----n Okay i also did same thing now this will work you can carry on with this fix... I am closing my PR...

Thanks...

vandanmshah avatar Oct 26 '19 13:10 vandanmshah

@k----n I will look into it if you want?

vandanmshah avatar Oct 26 '19 15:10 vandanmshah

@vandanmshah Please do! I haven't really looked into why the play/pause button doesn't update.

Maybe submit a PR to my branch? https://github.com/k----n/zen-audio-player.github.io/tree/repeat-fix

k----n avatar Oct 26 '19 15:10 k----n

Is this still an issue? It only seems to happen if you fast forward to the very last second of the file at the moment. Was this always the issue?

SimonRosengren avatar Jun 25 '20 12:06 SimonRosengren

@SimonRosengren I guess that's the bug, it only happens when clicking near the end of the track. can you help test #328?

shakeelmohamed avatar Jun 25 '20 19:06 shakeelmohamed