12

Is there a way to let embedded videos (primarily Flash, but I'd prefer something that will also work with HTML5 video) automatically background load, but not start playing until explicitly started?

The typical use case where I want this ability is when opening a number of what I expected to be text pages in separate tabs using middle-clicks only to have something start yapping at me; at which point I need to click through all the new tabs to find and stop the offender.

I'd prefer not to completely block video download to avoid the startup delay if I decide to watch the video when I view the page its embedded in.

3
  • Dan, did you have an opportunity to test the new media autoplay options that Mozilla introduced in the about:config interface with the release of Firefox 63?
    – Run5k
    Feb 6, 2019 at 13:02
  • @Run5k No. In the past few years other changes, whether in the browser itself, or video players (I neither know nor care which) have already fixed the problems I had. The recent Chrome and FF changes were irrelevant because the problem they are intended to address has ceased to exist. Feb 6, 2019 at 13:59
  • Based upon what I have seen while utilizing Firefox over the last several years, that isn't entirely accurate. I am currently utilizing both Firefox 60 ESR as well as Firefox 65 on various machines residing on my home network, and I can assure you that video which automatically plays within the web browser is still problematic. While I'm glad to hear that you are happy with the end result and may not "know or care" why, please remember that this question has more than 16k views and can be extremely beneficial to the rest of the community who actually does still encounter this problem.
    – Run5k
    Feb 6, 2019 at 14:26

4 Answers 4

9

For embeded videos you can set media.autoplay.enabled to false in about:config.

For flash-players you can either disable automatic flash loading/start with some addon or use custom addons/greasemonkey scripts to disable each specific player's autoplay. For example: http://userscripts.org/scripts/show/13333

2
  • Is there anywhere that collects that sort of script so I could subscribe to a feed of some sort and have them automatically installed? Having to manually set up dozens of blockers for eg each local tv news site that gets nationally linked would be a major PITA, and since in most cases I'd never visit the site again a wasted effort. Dec 21, 2011 at 15:13
  • @DanNeely It really depends on the flash player they're using. AFAIK there aren't that many options out there, the most common for TV new sites being JWPlayer. There's also a script (userscripts.org/scripts/show/95182) that replaces embeded videos with JWPlayer and I think you can configure autostart.
    – Vlad
    Dec 22, 2011 at 9:08
5

With the release of Firefox 63, the media.autoplay.enabled option no longer affects automatic video:

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.

This option has been replaced by several potential configurations, most notably media.autoplay.default:

  1. Within a new Firefox tab, enter about:config
  2. If necessary, click the button labeled I accept the risk!
  3. Search for media.autoplay.default
  4. To allow autoplay by default, set it to 0
  5. To block autoplay by default, set it to 1
  6. To be prompted for each domain, set it to 2

Update

Following the release of Firefox 66, the same option that was previously available in the about:config interface is now built into the default Options page:

Firefox Block Media Autoplay

Checking that box will automatically set media.autoplay.default to 1 within the about:config interface. However, in order to completely stop media autoplay you will want to adjust the following settings, also:

  • Change media.autoplay.allow-muted to false
  • Change media.autoplay.enabled.user-gestures-needed to false

Sources:
Allow or block media autoplay in Firefox
Firefox gets improved autoplay blocking soon
'media.autoplay.enabled' setting no longer stops video auto-play (version 63.0)

0

You can use the Flashblock add-on to disable flash until you click it.

From the plugin page:

Flashblock is an extension for the Mozilla, Firefox, and Netscape browsers that takes a pessimistic approach to dealing with Macromedia Flash content on a webpage and blocks ALL Flash content from loading. It then leaves placeholders on the webpage that allow you to click to download and then view the Flash content.

1
  • I'm aware of flashblock, but unless I'm misunderstanding what it does; it's a much more heavy handed approach than I'm looking for. Bandwidth is cheap and so are CPU cycles; initializing the player and loading data in the background are not problems and I'd rather not have to wait for them to happen when I decide to start a video playing. Dec 21, 2011 at 15:25
0

Unfortunately the solution built into the Options page described in https://superuser.com/a/1371593/105108 answer does not always work out of the box in current versions of Firefox (Firefox 90 as of now). Sometimes videos are getting blocked, sometimes are not. This problem was reported on support.mozilla.org: https://support.mozilla.org/en-US/questions/1278114. As of now, to reliably block video from auto playing, you also need to change one more option in about:config:

media.autoplay.blocking_policy = 1

It has 3 possible values. The default value 0 does not block all videos for some reason. The 2 value breaks some online music sites. So value 1 seems to be a solution for now. Some links on media.autoplay.blocking_policy in about.config:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .