Hacker News new | ask | show | jobs
by coldpie 3779 days ago
Firefox has the setting "media.autoplay.enabled" for this. It mostly works, although some websites (notably Youtube) assume that autoplay succeeded and so the player acts slightly wonky, e.g. the played/paused state is backwards.

I would be interested to know of any extensions that do similar and work better.

2 comments

Believe me I've looked. As far as I can tell, there's no way to make one that works for everything because the HTML5 standard* doesn't have a clear distinction between things that autoplay and things that don't, the way there was between "flash content" and "everything else".

*I'm not a tech guy so I may be using the wrong terminology here.

Yes, it's a tricky problem because "what does autoplay mean?" If you load up a page containing an HTML5 game, presumably you want the background music and SFX to work. But how do we differentiate those from an unwanted autoplaying audio ad?

I believe the Firefox devs settled on anything during/after a user interaction is allowed to autoplay. More at this bug (which I've been following for years, if you couldn't tell :)

https://bugzilla.mozilla.org/show_bug.cgi?id=659285

I have autoplay disabled in FF. The trick in Youtube is to double click the play button the first time. After that all works normally. (For some reason double clicking the video area doesn't produce the same result.)
Double clicking the video area is a shortcut for fullscreen view.
It doesn't quite work "normally," the play/pause button state is backwards, but yeah, it works good enough.
Ha, it may very well be, I never noticed.

I find a general difficulty with processing the meaning of "modal" buttons. If it's showing the "Pause" symbol, does it mean it's paused now, or that it will pause when I click it? I had the same problem with the stupid slider buttons that have become fashionable to use in place of checkboxes.