-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Race condition on looped sounds #69
base: master
Are you sure you want to change the base?
Conversation
…ame time the .ended callback is called it would re-start the sound, despite that the .stop() was called.
Hi, thanks for that investigation. I will check this soon. |
…sed to disable the 'disable cache by default' mechanism in ion.sound
# Conflicts: # js/ion.sound.js
I'd also added an option called 'allow_cache', which would allow developers to disable the 'no cache' functionality. |
Any progress with this? |
Hi, @lpetrov, sorry, had no time to work on it in 2017. But i promise i will review everything regarding ion.sound in the beginning of 2018! Happy New Year! |
Basically, this one is really, really, really hard to replicate.
I'd to reload tons of times to try to replicate it and it happens randomly.
So, the thing is that, when a sound had been manually .stop()'ped, browsers as Firefox, can eventually trigger the .ended callback few moments after the .stop() call, which would trigger the sound to loop again.
This is why, I'd added this small additional check that should solve potential race conditions as this one :)