3 ms·
Browser features to block autoplay do work. (most default to allow muted videos) Videos won't play unless they're started by javascript triggered by a small han
by jimbobthrowawy 2y ago
Browser features to block autoplay do work. (most default to allow muted videos) Videos won't play unless they're started by javascript triggered by a small handful of user generated events. i.e. if the .play() is further down the call-stack than an .onClick()
There's this thing called "click laundering" though. Where the website will take any qualifying event you trigger anywhere on the page and make it play the video. (I did it myself to make a gimmicky webpage work before)
It's aggravating, but I think there's browser addons to fix it.
- account42 2y agoIn theory. At least firefox still allows playing audio via window.AudioContext without any user interaction. Audio isn't the only problem though. I'm starting to think that any non-trivial javascript execution should be behind a permission prompt.
- jimbobthrowawy 2y agoBrowser vendors are rightfully scared of "breaking" websites. I don't know how you'd define non-trivial javascript in a way that couldn't be circumvented.
- account42 2y ago> I don't know how you'd define non-trivial javascript in a way that couldn't be circumvented. One approach would be to start out with the interpreter only with extreme throttling. Then to remove the throttling and enable the JIT you'd need explicit permissions.