Firefox 66 to block automatically playing audible video and audio (2019)
hacks.mozilla.org
hacks.mozilla.org
I wanted my game to have good UX so I cleverly required inputs before any sound would be made. Usually via the game selection screen. But if Ctrl is your “action” key, it doesn’t actually allow the Audio API to work, so you’ll miss some sounds.
I get why this restriction is in place but sometimes it makes good faith attempts at good UX a bit complicated.
Try and look at an Ars Technica page. Or any random news website. I want to READ the content. Not be distracted by something else.
Since the Terms of Service of the Internet running on the National Science Foundation's backbones actually prohibited commercial activity, that put a crimp in the style of people who would try to extract money from its usage, don't you think?
There’s no way to have permissions that depend on things that happen inside the content box / “unsafe zone” that can’t be gamed.
This is my preferred interface for NPR news, and it might address your issue also:
Essentially it's disabling gesture activation, so if you want to allow audio you need to do this explicitly. Note however, that whenever you directly visit a video file, audio will still play but this is very rarely the case.
I think Google added an option to disable all/most autoplaying content in Chrome a couple of years ago. But they quickly backtracked and removed that flag, claiming that it breaks in-browser games or something like that. It's a pretty weak reason for me, I don't care about in-browser games, I just want to read a news article without some irrelevant video popup distracting me, plus blasting audio.
(Yes I know such sites/tricks may increase my download traffic and brower CPU usage, etc, but I would just stop using such sites then, as I do now)
https://addons.mozilla.org/en-US/firefox/addon/disable-autop...
The reasoning is that advertisers can approximate video with canvas tags, gifs, or just swapping out images really fast, defeating the point and needlessly burning more CPU/bandwidth. But for users that care you can still opt-in to this behavior and presumably few enough people do this that the workarounds aren’t widespread.
(The key difference seems to be that playing audio has a clear path that’s straightforward to block but “video” can be approximated by any webpage interactivity making it harder to lock down)
Also I bet most of the users still running Firefox are quite technical and most likely are blocking ads anyway.
For animated images I'm not sure if it is exposed in the UI but in about:config change image.animation_mode to "once". If you want to replay it after that, you will need to open the image in a new tab. It is somewhat easy to miss them with this setting since even images at the bottom of the page will start their single animation when you hit pagedown (even if you move the page view up again almost immediately).
Mostly this autoplay blocking has been wonderful, a massive improvement. The one slight annoyance I've noticed is that the exceptions managament isn't as flexible as uBlock origin's configuration and you can't tell Firefox to unblock all of Bandcamp. I'm not sure if this is something that could potentially be done in an addon. The other thing I'd really like is a way to default "loop" to off on media controls so that I can just play the media once by default when I do play it. Oh yeah, for some reason I can't imagine Twitter tries hard to make videos repeat and current autoplay restrictions aren't able to stop that (I don't have an account so I suspect this is a "fuck you for not making an account" thing. I can't imagine anyone putting up with that more than briefly).
(Written in FF, which is my main runner. Said with a touch of sarcasm, a touch of wistfulness, and a refusal to give up hope.)
All of the other solutions are dumb and I can't believe browser vendors have settled for them.
(Could it be related to the biggest browser vendor also running their own video site that bypasses all autoplay restrictions? Nah...)
There is no API to detect that auto blocking is enabled and manual intervention is needed.
You are forced to play a fake audio tag with sound and detect that it's event does not fire. This is impossible, so you do it with a timeout and throw your hands up.
you are designing the fabric of a medium where the main use case is to open 20 pages at once from completely random strangers across the internet. OBVIOUSLY it should not autoplay sound by default.
(also the same reasoning explains why JS should not be a thing, because it slows everything down and causes bugs by letting casuals design the fabric instead of the browser just coming with what's needed (you'd think they can do this with trillions of man hours))
The internet was more interesting (and usable) before JavaShit became a thing.
Source: Old man shouting at clouds (me) who witnessed and fondly remember the internet of the 90s and early 2000s.