
Firefox 66 to block automatically playing audible video and audio - mfsch
https://hacks.mozilla.org/2019/02/firefox-66-to-block-automatically-playing-audible-video-and-audio/
======
tyingq
Now if I could only get NetFlix to stop it as well.

Is there anyone that actually likes the autoplay when watching Netflix on TV?

Update/Note: This is in the Roku app. I'm specifically talking about previews
autoplaying while I scroll though different shows on the main navigation...

~~~
imgabe
There is a setting in your Netflix profile. I assume it stops it on every
device, I haven't tried it though.

~~~
jm4
That only stops the next episode in a show from automatically playing when the
current episode ends. It doesn't get rid of the obnoxious autoplay previews
when you are browsing.

------
karolg
I hate autoplay so much that probably no one in the whole universe hates it
more than me. This is the stupidest human invention ever. </rant>

I'm really grateful for customizability of firefox. I discovered "media.block-
play-until-visible" in about:config some time ago and I hope that they don't
have plans of removing that option in the future.

~~~
bgroins
"media.block-autoplay-until-in-foreground" if you're searching for this.

~~~
cmurf
Default true in FF 65 (possibly earlier).

------
jonahhorowitz
_Muted autoplay is still allowed._ WTH Mozilla. Just stop. Stop the stupid
auto-playing video. Nobody wants it.

This announcement almost made my morning. It's frustrating seeing video
everywhere when you're just trying to read an article. If I wanted video, I'd
turn on my TV.

~~~
untog
This is because of animated GIFs. If you disable muted video people will just
use GIFs instead and it'll chew up way more of your bandwidth than a video
file would. If you disable animated GIFs someone will make a JS library that
recreates it, using (probably) even more bandwidth _and_ CPU cycles.

This was the case on mobile until recently (maybe a couple of years?) and the
benefit to users after the change is obvious. I get the frustration but it's
very much a real-world compromise with good reason. I do think that they could
make this a configurable option though, much like disabling JS.

EDIT: looks like they did:
[https://news.ycombinator.com/item?id=19077887](https://news.ycombinator.com/item?id=19077887)

~~~
wlesieutre
And a lot of things that are "animated gifs" really aren't animated gifs
anymore, they're using audioless video players. So if you stopped autoplay,
everything from gfycat, imgur, and similar would stop playing.

~~~
jononor
... until clicking the play button.

~~~
codetrotter
And when people browse Reddit, do you think they want to individually press
play an extra time on each and every video that they look at? Of course they
don’t!

So everyone ITT saying that “nobody wants automatically playing videos”.
Actually yeah, we do, and there are _many_ , and I mean _MANY_ of us.

~~~
jononor
Whitelist Reddit then. Or turn on autoplay for all websites.

~~~
bllguo
Or maybe we can take the current approach and leave a sensible default for the
people who aren't savvy enough? And people like you and I can just toggle the
option?

~~~
robryan
Do the majority really want autoplay? Facebook forced it on people and made it
hard to find the disable option.

~~~
wlesieutre
On pages that I go to specifically to play a media file, yes. Maybe a
reasonable middle ground would be that each page can auto-play a single video
element?

There are probably uses that I'm not thinking of (or don't partake in) where
this would still be a problem for people.

------
paol
You can use it right now, it's just disabled by default. Go to about:config
and set media.autoplay.default to 1 or 2.

~~~
cptskippy
What do the values mean?

~~~
saagarjha
Someone has listed them here: [https://support.mozilla.org/en-
US/questions/1238033](https://support.mozilla.org/en-US/questions/1238033)

~~~
cptskippy
Thanks!

media.autoplay.default:

0 : Allow autoplay

1 : Block all sites

2 : Ask permission on Site by Site basis

------
femto113
I've always found it curious that this sort of tech is called "blocking", as
if the browser has to proactively prevent websites from reaching into your
computer and playing a video or displaying an ad or popping up a window.

~~~
21
Yeah, I probably visit YouTube to read the comments.

And Giphy.com to admire their logo.

~~~
efreak
I visit YouTube on rare occasions because I can't find anything else telling
me how to do something. The first thing I do is to read the video description
and comments looking for a summary, and _not_ actually watch the video. I
detest having to watch long video how-tos, as, among other things, it prevents
simple side-by-side comparisons and looking at multiple steps simultaneously.
Take the work you put into making a good video and use it to make an actual
diagram for your diy instructions instead.

------
jasode
On related note... I came across a webpage yesterday with autoplaying video
that doesn't respond to the GUI:

[https://www.denverpost.com/2019/01/31/wade-phillips-
masterfu...](https://www.denverpost.com/2019/01/31/wade-phillips-masterful-
super-bowl-tom-brady/)

If you click on the video to unmute it, you can't click again on the pause or
mute icons to stop it or mute it. This behavior of ignoring your clicks
happens in both Chrome and Firefox. Even clicking on Chrome's tab area with
the little speaker icon doesn't mute it. To stop it, you can click on the
video window's hamburger menu -- or close out the entire tab.

I don't know if it's aggressive javascript tricks or a bug in the browsers. It
was the first webpage I found where Chrome's speaker icon on the page's tab
couldn't mute the audio.

~~~
Zarel
That looks like a scripting bug.

What it's doing is that it's intercepting your click on the video, preventing
the default click action (of pausing the video), and then manually pausing the
video. I would assume this is for cross-compatibility: Some browsers would
pause the video, and others wouldn't, so the script interception makes it so
the video correctly pauses on all browsers.

On my computer, it plays/pauses without issue.

Most likely, you've configured your computer to disallow the prevention of the
default click action, so when you click, it toggles the play/pause state to
pause, and then the script toggles it again, back to play.

As for Chrome's tab area, the little speaker icon no longer mutes sites as of
Chrome 70 or so. You now have to right-click on the tab and click "Mute Site",
which works normally for this video.

~~~
jasode
_> As for Chrome's tab area, the little speaker icon no longer mutes sites as
of Chrome 70 or so._

Thank you for mentioning this so I can retain my sanity. It would have never
occurred to me that Google would remove a useful feature like that. (Although
I can see that a right-click-mute is more useful when there are dozens of tabs
that narrow the widths too much to show a speaker icon.) It must have been
pure coincidence that I haven't had a need to mute a webpage since Chrome 70.

I was puzzled why _both_ my Firefox and Chrome couldn't stop the video and
your comment about the javascript click events made me look at my DNS logs. I
noticed that my firewall blocks a lot of sites like "js.spotx.tv", "ntv.io",
etc that's loaded by "denverpost.com" \-- therefore I may be preventing some
(ad) scripts from running that makes the GUI "fixes" you mentioned.

------
drewg123
The article shows that user will be able to whitelist sites on the desktop,
but what about mobile?

My use case is that I use FF on Android as my default web browser. If I turn
off media autoplay, I'm 99% happy. However, there are a few sites that I want
to autoplay. In fact, my local NPR stream refuses to play if not played via
autoplay. So I'm forever toggling the autoplay setting on and off mainly so I
can listen to my local NPR station.

~~~
psychometry
That's something you should report to NPR.

~~~
tomp
No, that very likely means that Firefox's implementation is broken. The
website shouldn't be able to detect the difference between _video loading
really slowly_ and/or _network being temporarily unavailable_ and _video
blocked_.

~~~
untog
Mobile devices have user interaction restrictions for media playback. It
sounds (though I have no idea myself) that NPR is getting tripped up by them
somewhere.

------
musicale
This is long overdue. Now if someone could just fix the autoplay setting in
Safari so that it actually does what it claims to do.

Oh, and also fix the "block pop-ups" feature so that it actually blocks the
obnoxious pop-ups that follow you around as you scroll (and often include
annoying autoplay videos, demands to "subscribe to our newsletter," etc..)

Edit: Wait, "Muted autoplay is still allowed?" Why is it so hard to stamp out
the scourge of autoplay? :(

~~~
m0dest
Because animated GIFs are already muted, autoplaying videos. If you don't give
web devs an efficient way to play silent animations and videos, they resort to
horrible and inefficient hacks (animated GIF, image sprites, drawing video
frames to a canvas, etc.)

Safari allows you to change the autoplay blocker to include all media, not
just audible. But, for the web in general, muted autoplay is the right
default.

------
kgwxd
"Muted autoplay is still allowed." Hopefully that will remain configurable,
that behavior is still visually annoying and a waste of bandwidth and energy.

I've been disabling autoplay in Firefox via about:config since it was
available, no audio or video unless I click play. I've never run into a
scenario where I've wanted or needed it to be any other way.

~~~
sp332
In Nightly at least, media.autoplay.allow-muted = false should disable muted
videos as well. I'm not positive they're moving this feature into FF66 for
release but it seems likely.

------
richardwhiuk
> At this time, we’re also working on blocking autoplay for Web Audio content,
> but have not yet finalized our implementation. We expect to ship with
> autoplay Web Audio content blocking enabled by default sometime in 2019.
> We’ll let you know!

So you can auto-play a video, muted, and auto-play audio separately? Well that
seems like a trivial work-around.

~~~
Vinnl
I don't know why anyone would do that if you already know that that's going to
be blocked in a short while as well.

------
richjdsmith
Just a heads up, it also includes blocking timers ringing set on DDG and
Google. I found that out the hard way with over-hard boiled eggs two days in a
row.

~~~
ryanisnan
According to the post you can whitelist those properties to allow autoplaying.

------
dtech
Very good for those annoying news sites. The UI for allowing legitimate sites
seems a bit hidden, I wonder if you'll get a request a la notifications.

------
adamredwoods
I don't understand why there isn't a button next to the url bar in the browser
that can allow/disallow auto-playing audio and/or video. This should be an
easily accessible on/off switch.

------
Groxx
66 has been around in the dev release for a while now, and I love this
feature. I can finally visit a news sites, and not have a random unrelated
article's video with sound (usually off-screen) start playing.

------
krigath
The Brave browser ([https://brave.com](https://brave.com)) has been doing this
for a while. I'd recommend it. It's faster, saves bandwidth and blocks the
majority of ads. Only downside is that I have to explicitly let my online bank
see my location in order to log in.

------
throw7
i've had autoplay disabled for awhile now... the latest annoyance is the
floating videos used especially on news sites.

------
babuskov
:(

I have a couple of HTML4 DOM-based games. Looks like I should prepare for
gazillion of support requests saying that the sound stopped working in the
game.

So, what should I do, rewrite everything from scratch in HTML5 and tax CPU/GPU
unnecessary.

Another instance of ass __ __s ruining the technology for everyone else.

~~~
gamanoid
I'm sorry if this is a naive question, but won't your games have a "PLAY/START
GAME" button?

If not, wouldn't adding one satisfy the requirement for user interaction on
the page?

~~~
babuskov
It does have the start button. Does this mean that after a single click you
can play sounds as much as you can?

If that is the case, I guess it's fine.

------
jointhefuture
Someone should make a service and browser plugin "boycotttheautolay.org"

It will insert a screen covering block "do not do business with XYZ" for any
company who's ads autoplay.

maybe you can even get money for it if you claim you use deep learning to
figure out the contents of the video ads.

------
JohnFen
It would be nice if they could provide similar blocking for video autoplay
even if it is muted.

~~~
gnode
You can set this with a config setting:

    
    
        media.autoplay.allow-muted    false

------
trumped
been waiting for this since v1.0 ... on the other hand, popup windows appears
to have made a come back... my dad clicked a "cat video" link on Facebook
(external link) and it was pretty scary (had to end task or click download)

------
scegit
Great job! very annoying. I was wondering why they haven't done this before.

------
argd678
It would be nice if this was an option and I could block muted auto play too.
Some websites have so much media that the page takes 5 or more seconds to
render when I just want to read the text.

------
BearsAreCool
Is there any current way (chromium or firefox) to mute all sites until I
specifically ask to unmute a website? There are only 2 websites I use that I
want to play audio.

------
beaconfield
AWESOME! This will make my life so much better, sadly.

------
stevehiehn
Didn't chrome just do this as well?

------
jakeogh
surf: ahead!
[http://git.suckless.org/surf/commit/723ff26c3618cf4db1ae3468...](http://git.suckless.org/surf/commit/723ff26c3618cf4db1ae34688509cbcdfed1412f.html)

------
thiago_fm
About time

~~~
grezql
yes, and hope they can block those annoying videos that minimizes and follows
you scrolling down to read and article.

Nothing is more annoying than seeing moving objects/video when reading an
article. Cant concentrate at all

~~~
noneeeed
My HCI lecturer at uni used to call that our "monkey reflex". We have some
really primitive reflexes around detecting movement in our peripheral vision
that happen waaay before our conscious brain gets involved. I think some of
them happen within the first few layers of visual processing.

You basically can't ever _fully_ ignore movement, especially if it is
irregular (so not a short loop), a part of your brain is always shouting about
it, although your brain will tune out highly regular motion like a swinging
pendulum.

------
jamesgeck0
I'm curious if this will break any older browser games.

------
prike
Firefox, not the hero we deserve, but what we need.

------
alinspired
to block in FF63 and newer, change in about:config

    
    
        media.autoplay.default -> 1
        media.autoplay.enabled -> false

------
spacesuitman2
How does this work with allowed website iframes?

~~~
anticensor
I think the parent frame's autoplay setting would apply.

------
throwaway2048
Dosen't seem to be any mention of a whitelist feature for important properties
like what chrome has for youtube.com et all.

glad to see it

~~~
sp332
There's no whitelist. I've been using this in Nightly for a while and the
ability to block youtube videos from autoplaying is great.

~~~
mindcrime
Youtube is the one (and pretty much only) site where I generally _do_ want the
videos to autoplay.

~~~
sp332
You only have to set it once. It's a per-domain setting (not sure if the
screenshot in the article explains this very well). The default, in Nightly at
least, is to ask the first time a site tries to autoplay video. It looks just
like the popup that asks when a site wants your location.

~~~
thecatspaw
While this is a good step, it will unfortunately lead to an increase in first
leevl support by people who are confused by the new dialog, or who misclicked
and cant figure it out.

But what would the solution be?

A) mozilla keeps a list of domains who can autoplay on their own domain. I am
not a fan of this as mozilla would now need to vet sites, and could heavily
influence all sorts of metrics on affected sited

B) websites can identify themselv as mediaSite or similar, where the primary
focus is the video. However this would allow any site to use that tag, and
solve nothing

~~~
calebegg
Chrome has a solution to this that doesn't involve individually vetting sites.
It's based on an individual user's behavior on previous visits to the site,
and what percentage of those visits involved media usage.

[https://developers.google.com/web/updates/2017/09/autoplay-p...](https://developers.google.com/web/updates/2017/09/autoplay-
policy-changes)

------
fazlerocks
Finally! :D

------
fdggdfsvscvsd
Can't wait!

------
dmolony
Why wasn't this done 65 versions ago?

------
goombastic
I am going back to using Lynx next.

~~~
52-6F-62
Up next:

'Detects Lynx/2.8.5rel.1 libwww-FM/2.15FC SSL-MM/1.4.1c OpenSSL/0.9.7e-dev'

 _autoplays full-viewport ASCII rendering of [big-pc-co] advertising their
weekly DOORBUSTER SALE OF THE YEAR_

------
daveheq
Firefox still runs slower than any other program on my computers.

~~~
medecau
I see, you don't have Chrome installed.

------
pbhjpbhj
Muted autoplay not being able to turn off -- is that for users, or for Google
(who pay most of Mozilla's bills).

~~~
bleriot
For users. See all of the responses about gifs and bandwidth. I hate autoplay
video but don’t want to sacrifice gifs to block it.

~~~
JohnFen
Why would you be sacrificing animated gifs? At worst, it just means you'd have
to click something to get them to start animating (which, personally, I would
consider a very good thing).

------
m0zg
All nice features, but until they have proper profile management (and not just
awkward "containers") it's a no-go for anyone who has to access job-related
web sites from their personal device. Which on this site is probably most of
us. Chrome got this right many years ago. Mozilla refuses.

~~~
CorpusCalcium
>Mozilla refuses.

about:profiles

~~~
m0zg
It's about as good as not having it at all. Check out Chrome's _usable_
implementation, where I have such a breakthrough (and apparently
insurmountable for Mozilla) feature as conveniently switching between
profiles.

~~~
CorpusCalcium
Wow, is it really that difficult to click "launch profile in a new browser"? I
mean I know we're all becoming spoiled brats over time, but to consider a
click or two "unusable" is truly beyond the pale.

~~~
m0zg
Considerably more difficult than continuing to use Chrome, where I can switch
users without leaving the main UI, including through the menu.

~~~
CorpusCalcium
Well then use Chrome, where you don't have to suffer the pea under your
mattress that is typing about:profiles once in a while.

------
ericras
An unintended consequence of this: sites will use massive animated GIFs
instead.

Edit: yeah, i should have actually read the headline and article.... whoops

~~~
pmontra
GIFs have no audio so they're equivalent to muted autoplay, which FF 66
allows.

