-
Notifications
You must be signed in to change notification settings - Fork 47
feat: Add option to automatically play on load, or when page url ends in #autoplay
#160
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
base: develop
Are you sure you want to change the base?
Conversation
#autoplay
|
Ah, I'd added a log during testing but forgot to remove the import. @badaix you want a debug log on autoplay? |
yes, why not, I think a debug log won't hurt |
20a5c5f to
846ad49
Compare
|
I tried it and I'm running into the problem that the browser does not start playing audio, but throws this error: |
|
Yes, I think we need a check and notify the user if autoplay is not working. Snapweb is already using "Alert Snackbars" if the server can't be reached, such a snackbar could be used to inform the user that autoplay is not allowed. |
|
See https://caniuse.com/mdn-api_navigator_getautoplaypolicy. I'm using this check, but falling back to trying directly if it's unknown. Currently only Firefox supports reading this directly, so we rely on fallback in all other cases. |




Fixes #159