feat: Add option to automatically play on load, or when page url ends in #autoplay#160
feat: Add option to automatically play on load, or when page url ends in #autoplay#160W-Floyd wants to merge 5 commits intosnapcast:developfrom
#autoplay#160Conversation
#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. |
|
@badaix hope you had a good holiday season 😊 Anything else you think should change on this one? |
|
I've built a docker image with this included, and now using CATT I can load Snapweb on Chromecast and it automatically starts playing! Stability tbd, that's unrelated to this feature though. |




Fixes #159