Firefox gets improved autoplay blocking soon
The Firefox web browser will soon block autoplaying media on webpages visited in the web browser more reliable.
Mozilla added options to control HMTL5 video autoplay in 2015 in Firefox and while the functionality worked fine on many sites, it did not work on others.
Work began to improve the functionality, fix bugs and issues. Firefox may soon block autoplaying media with sound by default in the browser similarly to how Google Chrome handles this.
Mozilla Firefox will block autoplaying media in background tabs if the tabs have never been activated by the user. Autoplaying media may be blocked even if the tab is the active one, e.g. when autoplay is disabled in the preferences or if the media is audible and the user has not interacted with the tab.
Firefox will display a prompt to the user in the user interface by default when autoplay is blocked to allow playback. Keeping "Remember this decision" checked will store the user preference for the site to whitelist (allow) or blacklist (don't allow) it.
A new setting was added to the Firefox preferences in Firefox Nightly currently that gives users options to set default autoplay behavior and manage the list of exceptions.
- LoadÂ about:preferences#privacy in the browser's address bar and scroll down to the Permissions section.
- Locate "For websites that autoplay sound" under Permissions.
- Set the default autoplay behavior to "allow autoplay", "always ask", or "don't autoplay".
- Select Exceptions and add sites the whitelist or blocklist to allow them to autoplay media with sound or deny them the right.
New Autoplay Preferences in Firefox
Mozilla added several new preferences to Firefox that determine autoplay blocking rules in the browser. Note that these are included as of Firefox 63.
- media.autoplay.default -- Defines Autoplay behavior of the browser. Default value is 0.
- Value of 0: Autoplay allowed.
- Value of 1: Autoplay blocked.
- Value of 2: Prompt the user.
- media.autoplay.ask-permission -- Defines whether prompts to ask the user for permission to play media set to autoplay (with sound). Default is false.
- Value of True: Prompt is displayed in the user interface.
- Value of False: The Prompt is not displayed.
- media.autoplay.enabled.user-gestures-needed -- Defines whether user interaction with a page with autoplaying media with sound is required. Default is False.
- Value of True: The user needs to have interacted with the page.
- Value of False: Interaction is not a requirement.
- media.autoplay.allow-muted -- Defines whether autoplay of media without sound or sound muted is allowed. Default is true.
- Value of True: Autoplay of muted media and media without sound is allowed.
- Value of False: Autoplay of muted media or media without sound is not allowed.
- media.autoplay.block-webaudio -- Defines whether autoplay should block webaudio as well. Default is set to false.
- Value of True: Webaudio is blocked as well.
- Value of False: Webaudio is not blocked.
Note: The preferenceÂ media.autoplay.enabled is not listed anymore and it seems to have been removed as of Firefox 63. If you set it and right-click on it to reset it, you will notice that it is removed automatically on restart; that's a clear indicator that the preference is no longer supported.
The current implementation blocks audible audio and video in Firefox on the desktop and on mobile but won't block WebAudio at this time. Plans are underway to add WebAudio blocking in future releases.
When the change goes live, Firefox will block autoplaying media in tabs that did not have user interaction by default. Firefox users can change the behavior using the preference listed above to better address specific needs.
Interested users and developers can follow the development here.
Now You: How do you handle autoplaying media?
There is also `media.autoplay.allow-muted` https://bugzilla.mozilla.org/show_bug.cgi?id=1477477
Good point, thank you!
Well finally!! This was a big advantage for Google Chrome. Fortunately the MuteLinks extension works great so I didn’t have to move back to Chrome.
@Pedro, well Chrome doesn’t block autoplay for me, that’s why I moved to Firefox. It’s annoying how I set it so it stops auto play, but it keeps doing it, especially on YouTube.
Check out an extension called AutoplayStopper in the Chrome Web Store. It works well.
Mozilla being terminal assholes again. This means that they removed the pref to disable all autoplay for not legitimate reason, and only left us with the ability to block autoplay “when there is sound”.
Fuck you Mozilla.
There is media.autoplay.allow-muted to block muted autoplay.
That… doesn’t appear to be the case?
Ok with the modified version of your article including the media.autoplay.allow-muted pref, this is no longer a bad move from Mozilla.
They have a legitimate reason (and itâ€™s the same reason why all browsers are allowing muted autoplay): itâ€™s to allow the HTML video element to be on equal terms with animated GIF images.
Video is much more efficient than GIFs (videos are much smaller and require less CPU to play). If browsers allowed users to block all video autoplay, websites would be enticed to use animated GIFs instead, which would be a loss for their visitors. (E.g., on my old PC, a web page with a bunch of GIFs literally slows to a crawl.)
That being said, what browsers could do is to allow users to disable all animation autoplay (so, both videos and animated GIFs) but thatâ€™s a separate feature.
@Å ime Vidas
I don’t think that actually counts as a “legitimate reason”.
So from now on it only will be possibly to block autoplay with sound and muted vids will be allowed to autoplay themselves no matter what? If yes, then this feature is pretty useless tbh, since autoplay vids are always bad, no matter if they play sound or not.
No, there is also the preference media.autoplay.allow-muted
Oh, thank you for the clarification.
“…while the functionality worked fine on many sites, it did not work on others.”
Indeed. On Vimeo, the option prevents videos from playing at all!
On Waterfox 56.2.3 I have “media.autoplay.enabled” set to false, but it doesn’t always work especially with sites that play background audio.
Fortunately, Classic Theme Restorer comes to the rescue by incorporating an “audio playing icon” into the tab which just needs to be clicked to disable any sound emanating from a site. The setting can be found via Tabs —> Page 2.
I think there was maybe a bug that the pref was not working for pure audio until some Firefox version that may have fixed this.
For video, I’ve never seen a media autoplay with this pref on false on Waterfox, but someone has complained on the Waterfox reddit seeing this, I don’t know what to think.
I’m confused about your “audio playing icon”, I thought that this was in vanilla Waterfox already.
Just disabled CTR and yes, you’re right, there is an audio icon on tabs in the vanilla flavor of Waterfox.
I guess that since I’ve always enabled CTR before doing anything, I assumed the icon only appeared there due to the setting I mentioned.
Install addon “FlashStopper” on Waterfox and your problems with video autoplay will be gone.
There are also two useful addons for managing videos on Youtube: â€œYoutube No Bufferâ€, â€œStop AutoPlay Next for Youtubeâ€.
Thanks for the tip, but I woouldn’t really describe it as a problem. I only tend to watch YT when I get bored and there’s already a setting on pages to disable autoplay (next clip).
Still, Flashstopper might come in handy sometime if my surfing habits change.
Firefox is getting a smelly govt tool rather than a good browser. It has some hidden contracts with many platforms which control what is allowed to be turned off and what is not to be such.
Independence applications such as Waterfox are more independent and you can trust them more.
Would be nice if Firefox allowed ask to activate for the DRM Widevine Plugin like they did with Flash also. They allow that to run automatically and remove the ability to set it to ask to activate.
Hello Martin, please test your site behaviour as it is recently giving lots of problems..especially the mobile version. The mobile first loads the orange themed version which is quite slow and does not display comments. It also has hard to read fonts. Then if I request the desktop version a black theme version is displayed which has easy to read fonts, displays comments and generally fast. Now again if I load the mobile version I get the black themed mobile version which is good. All this is happening on latest official Chrome v69 installed on Android phones with RAM 3 GB or more.
Regarding accessing the site from desktop, if I access the site using IE 11, the site may not display latest articles. This however doesn’t happen with Chrome.
BTW, I commented on this earlier but my comment didn’t appear.
I don’t get the issues that you describe when I try Chrome. Comments display fine for example on mobile. I will look at it more closely. If you try a non-Chrome browser like Firefox, you get the “dark” version right away.
Please check that you are using official Chrome v69 and up. Reload a page multiple times if necessary. I am talking about a orange theme that has very light text…nearly grey. It also shows a clock icon or something on the article image and often jumps to another page if I swipe mistakenly. It shows that the number of comments on an article but doesn’t actually display them. Actually, ever since Chrome was updated to v69 this issue with Ghacks started. I don’t use firefox.
I know that this site doesn’t have a dark theme. It’s the dark top bar that should be the default on both desktop and mobile.
Still, what I really need is blocking HTML5 auto-buffering.
Even that doesn’t work anymore. Firefox keeps breaking all addons and its own good old functions which are not edible to their big business partners.
From FF 63, in about:config you can set media.autoplay.default to 1 in order to block automatic playback on all pages or set it to 2 to decide on a per domain basis.
Please update the article.
Thanks for this review/update of Firefox’s 63 Media Autoplay settings.
Looks like I missed it when it was first published and discovered it thanks to the ‘RECENTLY UPDATED’ right-column category, much appreciated as well as ‘THIS DAY IN HISTORY’.
I just realized I still had (enforced) media.autoplay.enabled, no longer listed in FF63 as mentioned.
Maybe also worth reminding media.block-autoplay-until-in-foreground (Default = true) which disables audio auto-play in non-active tabs.
A partir de (al menos) Firefox 64.0.1 con solo modificar el pÃ¡metro media.autoplay.default en sus valores 0 o 1 es bastante. Yo lo tengo en 1.
Digo esto porque he probado modificando los 5 parÃ¡metros que cita el artÃculo y el resultado es exÃ¡ctamente igual que si modifico solamente media.autoplay.default.
Con el anterior parÃ¡metro “media.autoplay.enabled = false” (ya no viene incluido) se eliminaba toda la reproducciÃ³n automÃ¡tica, sin embargo de esta forma ahora no.
Al no venir incluido en esta versiÃ³n de Firefox lo editÃ© para probar obteniendo un resultado negativo. Tampoco trabajaba.
Con media.autoplay.enabled bloqueaba la reproducciÃ³n automÃ¡tica en YouTube tanto en el primer video que se abrÃa como en los sucesivos a Ã©l. Sin embargo ahora solo bloquea el primer video.
La soluciÃ³n que he encontrado es la siguiente:
media.autoplay.default y configurarlo en 1
Instalar Violentmonkey con el script https://greasyfork.org/es/scripts/33274-youtube-no-autoplay-up-next-disabled
Hay otra opciÃ³n. En uBlock origin agregar en Filtros de terceros y en el apartado de Personalizado el filtro
Stop Autoplay on YouTube –> https://raw.githubusercontent.com/DandelionSprout/adfilt/master/StopAutoplayOnYouTube.txt
Was running into some very frustrating, inconsistent behaviour with 69 Beta’s “Block Audio and Video” until eventually finding it was corrected by setting media.autoplay.enabled.user-gestures-needed to false.
The way that setting is named and defined seems a bit counterintuitive, as it implies that setting it to true is the stricter block, when false is actually the one that increases suppression of autoplay.