Firefox 51: blocks automatic audio playback in non-active tabs - gHacks Tech News

Firefox 51: blocks automatic audio playback in non-active tabs

Firefox will block the automatic audio playback of content in non-active tabs starting with version 51 of the web browser.

There are two types of background audio in browsers: first audio playback initiated by the user, for instance by starting playback on a site and then switching to another tab. Second, audio playback that starts to play in the background without user interaction.

Maybe you have encountered situations in the past where multiple YouTube videos started to play at the same time, or where a site spawned an audio or video ad that started to play automatically even though you were listening to music or watching a video.

The change that Mozilla implemented in Firefox 51 prevents some of these situations. Basically, what it does is block any audio playback until the tab is activated by the user.

So, if you launch a site in the background it won't be able to play audio until you switch to it first.

Tabs that have been activated once continue to play the audio without further interaction. This means that the feature won't impact audio or video playlists.

The audio blocking feature has no impact on sites that you load actively -- read not in the background. This is different from what Google tests in Chrome currently. The company launched a new experimental flag in Chrome that prevents more than one audio source from playing in the browser at any given time.

Mozilla plans to improve the new feature in Firefox 52 further. The organization plans to display a "play" icon in the tab bar of the browser that is linked to background tabs that attempted to play audio.

background audio play

The play icon, you guessed it, provides you with options to start the playback of the audio directly. This means that you don't have to switch to the tab, locate the player, and click on the play button there to do so.

Firefox users who don't want the new functionality can restore the old.

firefox block background audio

This is done in the following way:

  1. Type about:config in the Firefox address bar and hit the Enter-key afterwards.
  2. Confirm that you will be careful if the warning prompt appears.
  3. Search for media.block-autoplay-until-in-foreground.
  4. Double-click the preference.

A value of false turns the feature off, a value of true is the default value and means that it is enabled.

Mozilla plans to release Firefox 51 on January 24, 2017.

Closing Words

The new feature improves Firefox's handling of annoyances quite a bit. While it is not a catch-all solution, as it won't work for the active tab or tabs activated previously, it does take care of a subset of audio playback annoyances. (via Sören Hentzschel)

Now Read: How to mute sites permanently in Firefox

Summary
Firefox 51: blocks automatic audio playback in non-active tabs
Article Name
Firefox 51: blocks automatic audio playback in non-active tabs
Description
Firefox will block the automatic audio playback of content in non-active tabs starting with version 51 of the web browser.
Author
Publisher
Ghacks Technology News
Logo

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:

Comments

  1. Oxa said on November 14, 2016 at 7:18 pm
    Reply

    Mozilla finally had a good idea.

  2. Clairvaux said on November 14, 2016 at 8:47 pm
    Reply

    What is an “activated” tab ? Will Firefox continue to play ads coming from God knows where, because one will have “actively” browsed to a certain site to reach for useful information, but certainly does not want strangers blaring ads through one’s home loudspeakers while listening to music he chose “actively” ?

  3. ams said on November 14, 2016 at 10:25 pm
    Reply

    Just suppressing autostart, or muting, is not fully helpful.
    If playback of content loaded into an html5 videoplayer is allowed to autostart, muting doesn’t prevent CPU load from wastefully rendering the video animation, right?

    Settings currently enable me to open links in a new tab by middle-clicking mousebutton while surfing.
    I would like the new tab to not load its content, period, until I switch to that tab… but haven’t found a way to accomplish that.

    In my browser preferences, the “don’t load tabs until selected” preference is ticked.
    Apparently that setting is only applicable to start-of-session behavior.

    ironically, and counterintuitively, it is the preference “browser.tabs.loadInBackground=true” which enables middle-click-open-in-new-tab

    1. Caspy7 said on November 15, 2016 at 3:43 am
      Reply

      > Just suppressing autostart, or muting, is not fully helpful.

      I’d certainly say it is helpful to suppress autostart. Currently this is what it does for HTML videos I’ve seen (such as Youtube).

      > I would like the new tab to not load its content, period, until I switch to that tab… but haven’t found a way to accomplish that.

      There is at one addon that does this I know. The Suspend Tab addon (the setting is in its options).

  4. Geoff said on November 14, 2016 at 10:37 pm
    Reply

    This is a pretty cool and useful feature. Is Firefox 51 Beta 1 available anywhere? I am not seeing it so far. Thanks!

    1. Caspy7 said on November 15, 2016 at 3:58 am
      Reply

      Firefox 50 is currently Beta. 51 is Developer Edition. 51 will graduate to Beta sometime in the few days after the new release comes out on Tuesday (the 15th).

  5. KC1127 said on November 15, 2016 at 3:41 am
    Reply

    nice “feature”.

  6. Anonymous said on November 15, 2016 at 8:30 am
    Reply

    Awesome !!! Thanks Mozilla. I just hate websites who play videos automatically so I used to tweak Mozilla config to stop automatic playback but having it working only in the non active tabs is great.

  7. vosie said on November 15, 2016 at 8:46 am
    Reply

    It’s another useless, wrongly developed feature.

    Mozilla should implement a true Click-to-Play feature for all media content, for example HTML5 videos. This wold be the real development.

    Muting background tabs is completely useless, because the HTML5 videos will still download and play in the background. Moreover, it works only for background tabs. You can’t use click to play blocking for HTML5 videos like you are able for Adobe Flash content, which works for active (foreground) tabs too.

  8. Zemaitux said on November 15, 2016 at 10:25 am
    Reply

    I have a question, Martin. Why i can`t see comments when reading Ghacks from mobile? I have searched everywhere but could not find how i can read comments. From PC i can read comments without problems.

  9. Karol G. said on November 30, 2016 at 2:52 pm
    Reply

    Firefox had better option – ‘media.block-play-until-visible’ that blocked videos from playing in background tabs, but surprisingly removed it in version 51beta.

  10. Geoff said on December 19, 2016 at 1:24 pm
    Reply

    I am not seeing the little triangle play button to control the playing or stopping of the video/audio on the tab. I only see the mute button. I am using the latest Nightly 53. Did they not add it yet? Maybe it’s coming in a future version.

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.