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.
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.
This is done in the following way:
- Type about:config in the Firefox address bar and hit the Enter-key afterwards.
- Confirm that you will be careful if the warning prompt appears.
- Search for media.block-autoplay-until-in-foreground.
- 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.
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
Mozilla finally had a good idea.
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” ?
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
> 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).
This is a pretty cool and useful feature. Is Firefox 51 Beta 1 available anywhere? I am not seeing it so far. Thanks!
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).
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.
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.
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.
Firefox had better option – ‘media.block-play-until-visible’ that blocked videos from playing in background tabs, but surprisingly removed it in version 51beta.
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.