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