-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Hot replacement audio source #4009
Comments
Thanks! That's a weird bug. Looks like the previous URL is cached somewhere internally and isn't cleared properly on load. |
I think it's some race condition - when I'm debugging in DevTools this behavior step by step the new track is playing. |
I fixed it in your codepen by resetting the audio element like so:
Also it starts switching the audio after you press Next a second time, so maybe you're seeing this? |
I tried it but doesn't work P.S. Codepen has been updated |
For me, it now works when the track finishes and automatically switches to the next one. |
Yeah, it works, thanks so much |
Bug description
There are several tracks in the form of a playlist, they should play one after another. However, now when changing a track, the previous one plays. The problem is solved only by pausing and then playing again.
Environment
Minimal code snippet
https://codepen.io/SmirnovMaxim/pen/jENQyro
Expected result
After call
load(...)
the new track is playingObtained result
After call
load(...)
the old track is playingScreenshots
The text was updated successfully, but these errors were encountered: