This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

how do i really stop autoplay (including autoplay triggered by scripts)

more options

when media starts playing on my computer without my consent, this should be considered a cybercime.

The only way for a video to start playing should be `right click -> play`

cut the nonsense with the *media.autoplay.enabled* switch. it doesnt work and it never will. as soon as the website uses any kind of scripting, this switch is ineffective.


which extension do i need to install to stop this autoplay nightmare forever?

when media starts playing on my computer without my consent, this should be considered a cybercime. The only way for a video to start playing should be `right click -> play` cut the nonsense with the *media.autoplay.enabled* switch. it doesnt work and it never will. as soon as the website uses any kind of scripting, this switch is ineffective. which extension do i need to install to stop this autoplay nightmare forever?

Modified by Jazoray

All Replies (20)

more options

I don't remember how Firefox 53 worked, but in recent releases, setting media.autoplay.enabled = false stops videos from autoplaying at page load. So whether the video has the autoplay attribute or a script "clicks" Play immediately, it is stopped. However, after page load, if the script is triggered by scrolling the page or some other interaction, that is not blocked.

You will need an add-on.

more options

jscher2000 said

You will need an add-on.

as i already stated, i figured that much. however, there seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way.

more options

Jazoray said

There seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way.

This extension might ......

https://addons.mozilla.org/en-US/firefox/addon/flashstopper/

It says under 'About this Add-on' :

Alternative stopping method that prevent script activation by tweaking the source code of the pages

more options

Happy112 said

Jazoray said
There seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way.

This extension might ......

https://addons.mozilla.org/en-US/firefox/addon/flashstopper/

It says under 'About this Add-on' :

Alternative stopping method that prevent script activation by tweaking the source code of the pages

thank you for the suggestion, but this extension has no effect.

more options

Jazoray said

thank you for the suggestion, but this extension has no effect.

Bummer  !

In Add-ons => Plugins : Have you set 'Shockwave Flash' to 'Ask to Activate'  ?

more options

Speaking of Flash :

Your system details show that you need to update your Adobe Flash Player, so would you please uninstall your current version and install the latest version, which is 27.0.0.183

Uninstaller : https://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html

You can download te latest version from here : https://get.adobe.com/flashplayer/

Note : some 'extras' may be offered in the download.


Don't bite my head off now, but : after you changed the value of 'media.autoplay.enabled' - did you then close and restart Firefox  ?

more options

Happy112 said

Bummer  ! In Add-ons => Plugins : Have you set 'Shockwave Flash' to 'Ask to Activate'  ?

this works absolutely great for flash. but only for flash. and it was my solution of choice in the good old days.

But unfortunately there was a global conspiracy to discredit flash and now everyone is using html5 for video playback and the web is worse off because of it.

Speaking of Flash : Your system details show that you need to update your Adobe Flash Player, so would you please uninstall your current version and install the latest version, which is 27.0.0.183

newer is not always better. the version i have installed is the latest that has working audio. i rolled back to this one after a previous update.

Don't bite my head off now, but : after you changed the value of 'media.autoplay.enabled' - did you then close and restart Firefox  ?
  • puts some seasoning on your head*

yes, i have. as it turns out, and has jscher2000 already stated, media.autoplay.enabled is not even designed to prevent against playback starts from scripts.

more options

Jazoray said

jscher2000 already stated, media.autoplay.enabled is not even designed to prevent against playback starts from scripts.

Setting the preference false stops the player if a scripts clicks "play" when the page first loads. That was the working meaning of "autoplay" for purposes of designing that feature. It doesn't apply to scripts that trigger later in response to a user action such as scrolling the page, or that start on a delay.

I use the NoScript extension, which replaces videos from untrusted sites with placeholders. NoScript would be total overkill for only that feature. There might be other extensions that work similarly, but with the many ways sites can load videos, you might not find one that handles all of the cases.

more options

ah, thanks for the clarification. A problem with using the NoScript extension is, there doesn't seem to be a way to control the scripts granularly enough.

one of the sites i have this problem with is a website that i trust and that needs JS to function. but it has a bug/flaw/intentional **sholedesign (don't know which) that triggers videos to play ANY time the user clicks anywhere in the website. even after the video is paused. it's unfortunate that there is apparently no way for the browser to distinguish between intentional and unintended playback of videos. and then there is also the issue of embedded players running entirely in javascript.

currently my solution of choice is to use the "enable HTML5 video" extension, which allows me to set the about:config prefs for various codec/format support to false. this disables video playback entirely and i enable the format support only when i want to watch a video right now. of course, this is a terribly cludgy solution and doesnt help the problem with videos starting playback after being paused

Modified by Jazoray

more options

Please be aware that running outdated Flash Player/s are condoned by everyone including Adobe . Please have a read of this. https://www.welivesecurity.com/2017/07/11/adobe-flash-player-users-update-software-now/

more options

Pkshadow said

Please be aware that running outdated Flash Player/s are condoned by everyone including Adobe . Please have a read of this. https://www.welivesecurity.com/2017/07/11/adobe-flash-player-users-update-software-now/

if they want me to update then they need to make sure that the newer version is better than the old one. if an update causes the software to stop working like intended, i roll back the update.

Modified by Jazoray

more options

They all are. It maybe that you need to remove it completely before putting a update in. Doing it this way prevents issues.

Other reason is if you get infected through Flash do you want to infect your friends/family ? Do you really want to loose files. ? Do you want to do a complete reinstall of everything. ? Answer no to any of those is your reason.

You have also not explained why you are running a out dated version of Firefox 53 which is also a security risk ??

Note : Firefox 56.0.2 is current release https://www.mozilla.org/firefox/all/ Full Version Installer Note : Firefox 57 Quantum release date Nov 14th https://www.mozilla.org/en-US/firefox/quantum/ Note : Legacy Extensions will be disabled and or removed.

Please let us know if this solved your issue or if need further assistance.

more options

[Private information removed by moderator. Please read Mozilla Support rules and guidelines, thanks.]

Modified by Chris Ilias

more options

[Private information removed by moderator. Please read Mozilla Support rules and guidelines, thanks.]

Modified by Chris Ilias

more options

Jazoray said

one of the sites i have this problem with is a website that i trust and that needs JS to function. but it has a bug/flaw/intentional **sholedesign (don't know which) that triggers videos to play ANY time the user clicks anywhere in the website. even after the video is paused. it's unfortunate that there is apparently no way for the browser to distinguish between intentional and unintended playback of videos. and then there is also the issue of embedded players running entirely in javascript.

It's sometimes possible to redefine and override the methods of built-in objects like the VIDEO tag. I started creating a user script that makes the play() command do nothing so scripts that trigger it have no effect, and adds a userStart() command for the end user. But the more I experiment and reload the page the less able I am to make the video play after stopping it. Someone else who understands this stuff better will need to take a look. What I tried so far is here (userscript):

https://gist.github.com/jscher2000/586009d1d5078f4e72abe2be466d9144

more options

Note that the OP is on Linux and on that platform malware is less likely than on Windows.

If it is mostly the sound that worries you then you could consider to mute the tab using a extension.

more options

Happy112 said

Jazoray said
There seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way.

This extension might ......

https://addons.mozilla.org/en-US/firefox/addon/flashstopper/

It says under 'About this Add-on' :

Alternative stopping method that prevent script activation by tweaking the source code of the pages

Jazoray said

jscher2000 said
You will need an add-on.

as i already stated, i figured that much. however, there seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way.

Not compatible with Firefox Quantum

more options

See also:

more options

jscher2000 said

I don't remember how Firefox 53 worked, but in recent releases, setting media.autoplay.enabled = false stops videos from autoplaying at page load. So whether the video has the autoplay attribute or a script "clicks" Play immediately, it is stopped. However, after page load, if the script is triggered by scrolling the page or some other interaction, that is not blocked. You will need an add-on.

What is "media.autoplay"? Firefox help doesn't have any such thing.

I really need to be able to block autoplaying videos because of anxiety disorder; the tanj-blasted videos have set off more than one attack, bad enough that I consider it criminal assault.

more options

Kulindahr said

What is "media.autoplay"? Firefox help doesn't have any such thing.

You may not have looked in the right spot.

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste autop and pause while the list is filtered

(3) Double-click the media.autoplay.enabled preference to switch the value from true to false

Note that this breaks custom players on Vimeo, Netflix, and Imgur (GIFV files). There is a setting you can modify/add to improve the situation somewhat:

(4) Firefox 61 (Nightly): Double-click the media.autoplay.enabled.user-gestures-needed preference to switch the value from false to true

Firefox 59 (Release) or 60 (Beta): You need to create that preference, it is hidden in these versions. Here's how:

(A) Select and copy the following preference name:

media.autoplay.enabled.user-gestures-needed

(B) Right-click a blank area of the about:config page, the click New > Boolean

(C) In the small dialog that appears, paste the new preference name and click OK

(D) In the next dialog, click true then click OK

You are ready to test -- success?

Note: this allows autoplay of videos on sites where they are muted, so it restore some visual distraction. So you may need to use an add-on to filter out some of those other videos.

  1. 1
  2. 2