Skip to content
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

Event for mobile audio loading failure #44

Open
jurecuhalev opened this issue Jul 4, 2017 · 4 comments
Open

Event for mobile audio loading failure #44

jurecuhalev opened this issue Jul 4, 2017 · 4 comments

Comments

@jurecuhalev
Copy link
Contributor

jurecuhalev commented Jul 4, 2017

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 that audio-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.

@jkeen
Copy link
Contributor

jkeen commented Jul 5, 2017

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.

@jkeen
Copy link
Contributor

jkeen commented Apr 17, 2020

@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

@jkeen
Copy link
Contributor

jkeen commented Sep 7, 2021

@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

@jurecuhalev
Copy link
Contributor Author

@jkeen thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants