X
點擊此處開啟此網站的行動版。

技術支援討論區

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

已張貼

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?

由 Jazoray 於 修改

jscher2000
  • Top 10 Contributor
8699 個解決方法 71098 個答案

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.

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.

提出問題者

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.

''jscher2000 [[#answer-1024645|said]]'' <blockquote> You will need an add-on. </blockquote> 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.
Happy112 561 個解決方法 5694 個答案

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 [[#answer-1024648|said]]'' <blockquote> There seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way. </blockquote> 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 ''

提出問題者

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.

''Happy112 [[#answer-1024653|said]]'' <blockquote> ''Jazoray [[#answer-1024648|said]]'' <blockquote> There seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way. </blockquote> 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 '' </blockquote> thank you for the suggestion, but this extension has no effect.
Happy112 561 個解決方法 5694 個答案

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'  ?

''Jazoray [[#answer-1024664|said]]'' <blockquote> thank you for the suggestion, but this extension has no effect. </blockquote> Bummer ! In Add-ons => Plugins : Have you set 'Shockwave Flash' to 'Ask to Activate' ?
Happy112 561 個解決方法 5694 個答案

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  ?

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 ?

提出問題者

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.

''Happy112 [[#answer-1024681|said]]'' <blockquote> Bummer ! In Add-ons => Plugins : Have you set 'Shockwave Flash' to 'Ask to Activate' ? </blockquote> 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. <blockquote> 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 </blockquote> 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. <blockquote> Don't bite my head off now, but : after you changed the value of 'media.autoplay.enabled' - did you then close and restart Firefox ? </blockquote> *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.
jscher2000
  • Top 10 Contributor
8699 個解決方法 71098 個答案

有幫助的回覆

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.

''Jazoray [[#answer-1024704|said]]'' <blockquote>jscher2000 already stated, media.autoplay.enabled is not even designed to prevent against playback starts from scripts. </blockquote> 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.

提出問題者

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

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

由 Jazoray 於 修改

Shadow110 1072 個解決方法 14836 個答案

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/

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/

提出問題者

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.

''Pkshadow [[#answer-1024713|said]]'' <blockquote> 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/ </blockquote> 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.

由 Jazoray 於 修改

Shadow110 1072 個解決方法 14836 個答案

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.

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.
Shadow110 1072 個解決方法 14836 個答案

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

<!-- " Jazoray Today at 12:00 PM i am not at risk because i'm using older software. the hype surrounding updates is lunacy. you will clean your offensive post from my thread and i will hear nothing more of this nonsense. " (screen shot on request of private message) ____________________________________________________________________________ This feels some what threatening with the tone you are setting. --> ''[Private information removed by moderator. Please read [[Forum rules and guidelines]], thanks.]''

由 Chris Ilias 於 修改

Shadow110 1072 個解決方法 14836 個答案

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

<!-- " Jazoray Today at 12:31 PM i specifically messaged you personally in order to not derail the topic further. the topic of the thread is stopping video playback without user consent. your public posting of the message in the thread could be seen as a deliberate act to derail the thread into a discussion about updating. the "updates cure everything and if you are ever late with a single update you are 100% sure to be infected with malware"-Religion has no place in this thread. it is neither relevant to the issue nor the truth. i maintain several computers. some have had malware. some have had updates. the only ones that have had malware are the fully updated ones. but even if you were right. even if using older software actually increased the risk of malware infection, this has no bearing on the topic of the thread and is therefore spam. if you want to help solve the problem of autoplaying videos, i appreciate you and your posts. if you have specific knowledge that a newer version of firefox reliably prevents against videos being started through scripts, i welcome your contribution even if it involves updates. even though the newer version of firefox have many changes that make it worse than version 53. But if you only want to proselytize about the church of updates, do so elsewhere. " (screen shot on request of private message) _______________________________________________________________ I requested you to stop messaging me. Trust that everything will be posted. --> ''[Private information removed by moderator. Please read [[Forum rules and guidelines]], thanks.]''

由 Chris Ilias 於 修改

jscher2000
  • Top 10 Contributor
8699 個解決方法 71098 個答案

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

''Jazoray [[#answer-1024709|said]]'' <blockquote> 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. </blockquote> 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
cor-el
  • Top 10 Contributor
  • Moderator
17482 個解決方法 157978 個答案

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.

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.
MrToo 0 個解決方法 7 個答案

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

''Happy112 [[#answer-1024653|said]]'' <blockquote> ''Jazoray [[#answer-1024648|said]]'' <blockquote> There seems to be no extension that solves the problem of scripts trying to start autoplay in a generic way. </blockquote> 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 '' </blockquote> ''Jazoray [[#answer-1024648|said]]'' <blockquote> ''jscher2000 [[#answer-1024645|said]]'' <blockquote> You will need an add-on. </blockquote> 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. </blockquote> Not compatible with Firefox Quantum
cor-el
  • Top 10 Contributor
  • Moderator
17482 個解決方法 157978 個答案

有幫助的回覆

See also:

See also: *Policy Control - JavaScript and Flash blocker: https://addons.mozilla.org/firefox/addon/policy-control/
Kulindahr 0 個解決方法 5 個答案

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.

''jscher2000 [[#answer-1024645|said]]'' <blockquote> 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. </blockquote> 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.
jscher2000
  • Top 10 Contributor
8699 個解決方法 71098 個答案

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.

''Kulindahr [[#answer-1098444|said]]'' <blockquote>What is "media.autoplay"? Firefox help doesn't have any such thing.</blockquote> 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: <code>media.autoplay.enabled.user-gestures-needed</code> (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.