IonDen / ion.sound

JavaScript plugin for playing sounds and music in browsers
http://ionden.com/a/plugins/ion.sound/en.html
MIT License
712 stars 154 forks source link

Race condition on looped sounds #69

Open lpetrov opened 8 years ago

lpetrov commented 8 years ago

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 :)

IonDen commented 8 years ago

Hi, thanks for that investigation. I will check this soon.

lpetrov commented 8 years ago

I'd also added an option called 'allow_cache', which would allow developers to disable the 'no cache' functionality. By default, the cache killer (no_cache) would be enabled (as it is right now).

lpetrov commented 6 years ago

Any progress with this?

IonDen commented 6 years ago

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!