Open jurecuhalev opened 7 years ago
Thanks for reporting!
It really should fire something, and I like the idea of audio-blocked
. It's not exactly a failure worthy of an audio-load-error
in my opinion since the file loaded and is just sitting paused waiting for user interaction. Currently there's a hack in there that ties into the document touchstart
event to play the audio after it's been blocked, but adding an additional event for a consumer to tie into sounds like a solid idea to me.
@gandalfar Started work on this and feel free to pick it up if you're feeling motivated. I stalled out on some HLS problems and have to switch gears for a bit. Not sure when I'll get back on it
@gandalfar This is still an issue in ember-hifi, but I will report that the fork of hifi I made called ember-stereo
has an audio-blocked
event and helpers to deal with browser blocking autoplay. Check out the changes at http://ember-stereo.com
@jkeen thank you!
On mobile, it's possible for audio to fail due to:
Looks like the mobile browser blocked an autoplay trying to play sound with url ..
Would it make sense to trigger an event, e.g.
audio-blocked
? (I would also assume thataudio-load-error
would load in this case, but it doesn't)This would allow then to change UI to indicate to user that they should click on element manually.