Firefox gets improved autoplay blocking soon - gHacks Tech News

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 autoplay prompt

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.

  1. Load about:preferences#privacy in the browser's address bar and scroll down to the Permissions section.
  2. Locate "For websites that autoplay sound" under Permissions.
  3. Set the default autoplay behavior to "allow autoplay", "always ask", or "don't autoplay".
  4. 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?

Summary
Firefox gets improved autoplay blocking soon
Article Name
Firefox gets improved autoplay blocking soon
Description
The Firefox web browser will soon block autoplaying media on webpages visited in the web browser more reliable.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. yoovygxsyu said on September 21, 2018 at 12:09 pm
    Reply

    There is also `media.autoplay.allow-muted` https://bugzilla.mozilla.org/show_bug.cgi?id=1477477

    1. Martin Brinkmann said on September 21, 2018 at 1:32 pm
      Reply

      Good point, thank you!

  2. Pedro said on September 21, 2018 at 12:46 pm
    Reply

    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.

    1. Weilan said on September 21, 2018 at 2:13 pm
      Reply

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

      1. John said on November 2, 2018 at 3:41 pm
        Reply

        Check out an extension called AutoplayStopper in the Chrome Web Store. It works well.

  3. Anonymous said on September 21, 2018 at 1:30 pm
    Reply

    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.

    1. Martin Brinkmann said on September 21, 2018 at 1:40 pm
      Reply

      There is media.autoplay.allow-muted to block muted autoplay.

    2. Lindsay said on September 21, 2018 at 2:30 pm
      Reply

      That… doesn’t appear to be the case?

    3. Anonymous said on September 21, 2018 at 3:43 pm
      Reply

      Ok with the modified version of your article including the media.autoplay.allow-muted pref, this is no longer a bad move from Mozilla.

    4. Šime Vidas said on September 21, 2018 at 4:22 pm
      Reply

      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.

      1. John Fenderson said on September 22, 2018 at 12:59 am
        Reply

        @Šime Vidas

        I don’t think that actually counts as a “legitimate reason”.

  4. Chronius said on September 21, 2018 at 1:33 pm
    Reply

    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.

    1. Martin Brinkmann said on September 21, 2018 at 1:40 pm
      Reply

      No, there is also the preference media.autoplay.allow-muted

      1. Chronius said on September 21, 2018 at 3:33 pm
        Reply

        Oh, thank you for the clarification.

  5. Lindsay said on September 21, 2018 at 1:49 pm
    Reply

    “…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!

  6. TelV said on September 21, 2018 at 3:37 pm
    Reply

    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.

    1. Anonymous said on September 21, 2018 at 5:00 pm
      Reply

      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.

      1. TelV said on September 21, 2018 at 5:32 pm
        Reply

        @Anonymous,

        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.

    2. Robert Ab said on September 22, 2018 at 6:07 am
      Reply

      @TelV

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

      1. TelV said on September 22, 2018 at 3:46 pm
        Reply

        @Robert Ab,

        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.

  7. Anonymous said on September 21, 2018 at 10:19 pm
    Reply

    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.

  8. Anonymous said on September 21, 2018 at 10:28 pm
    Reply

    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.

    1. Martin Brinkmann said on September 22, 2018 at 7:36 am
      Reply

      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.

      1. Anonymous said on September 22, 2018 at 8:49 pm
        Reply

        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.

  9. Anonymous said on September 22, 2018 at 6:27 am
    Reply

    Still, what I really need is blocking HTML5 auto-buffering.

  10. Mithun John Jacob said on November 1, 2018 at 5:38 pm
    Reply

    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.

  11. Tom Hawack said on November 4, 2018 at 12:23 pm
    Reply

    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.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.