Skip to content

Instantly share code, notes, and snippets.

@GitTom
Created March 24, 2019 15:06
Show Gist options
  • Save GitTom/c4523999705eeadefafd0a6d52217bb9 to your computer and use it in GitHub Desktop.
Save GitTom/c4523999705eeadefafd0a6d52217bb9 to your computer and use it in GitHub Desktop.

Stopping Autoplay Videos

Browser's should include a setting that allows users to disable autoplay on videos (and then reenable it on a site by site basis, ideally).

I appreciate that Mozilla & Google try to balance the rights/interests/integrity of websites and their developers with the interests of their end-users, to keep the web healthy, but autoplay videos are a menace IMO.

I think most people would love to be able to end autoplay on Netflix!

I'm frustrated by the number of tech headlines that have pronounced that a new version of either browser has finally truly 'blocked autoplay videos' but so far it has never been true. Mostly what they do is block the sound from autoplay videos.

2019-03-24 We are still not all the way there... Here's the best that can be done so far...

Some Resources

2018-01 How to Stop Videos From Autoplaying
https://www.consumerreports.org/internet/how-to-stop-videos-from-autoplaying/

I've tried various extensions, but they were generally only partially successful and I stopped using them once the it seemed that the browsers were close to solving the problem.

Facebook:

As described in the CR article. Settings --> Video --> autoplay to off.

Chrome

The CR article above recommends ublock origin and adblock plus. Says they do it by default.

I've seen this in multiple places:

Set chrome://flags/#autoplay-policy to "Document user activation is required".

(I can't figure out how to turn 'chrome://flags/#autoplay-policy' into a link in Gist.)

Firefox

Has been very much in flux...

2018-12-11

It says 'media.autoplay.enabled', but that has changed, see this article:
https://support.mozilla.org/en-US/questions/1238033
Sounds like 'site-by-site' basis is still not available in stable, so I went with 'block autoplay by default' instructions.

2019-02-04

https://hacks.mozilla.org/2019/02/firefox-66-to-block-automatically-playing-audible-video-and-audio/
https://www.reddit.com/r/webdev/comments/an6mdi/firefox_66_to_block_automatically_playing_audible/
"Navigate to about:config, search for media.autoplay, and change media.autoplay.allow-muted to false.

2019-03-20 (FF 66)

https://www.reddit.com/r/firefox/comments/b35aed/is_mediaautoplaydefault_no_longer_supported_after/
Go to 'about:config' and change:

  • media.autoplay.default to 1
  • media.autoplay.allow-muted to false
  • media.autoplay.enabled.user-gestures-needed to false (it already is false)

It pauses videos that autoplay with sound. Chrome has had this for a while, but slightly different: it mutes them. Firefox's solution makes more sense, but neither do what the headlines always claim: stop the autoplay of all video (with a mechanism to allow site override presumably).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment