Greasy Fork is available in English.

Disable audio/video autoplay

Ensures that HTML5 audio and video elements do not autoplay, based on

James Edward Lewis II
Pemasangan harian
Total pemasangan
23 0 2
12 Februari 2015
05 Maret 2015
Berlaku untuk
Semua situs

After YouTube switched to using HTML5 by default, I wondered why Mark Pilgrim's classic "Disable video autoplay" UserScript from Dive into HTML5 wasn't working, and why it didn't keep Vine videos from autoplaying; I didn't notice anything wrong with the script itself, and I learned that YouTube uses a different method to make videos autoplay when I saw that the autoplay attribute was already false, but I was still inspired to extend the old script to turn off autoplay for HTML5 audio. I might figure out how to make this keep Youtube and Vine from autoplaying too.

I added a workaround for YouTube (and possibly Vine) based on this:

I have also incorporated more sophisticated anti-autoplay script based on Stop Youtube HTML5 Autoplay by Leslie P. Polzer of PORT ZERO

I added a workaround for the older Flash-based YouTube, based on this:

I also added an attempted workaround for some videos on Tumblr, based on this:

For the benefit of those who would use this script in IE7Pro, I have used Eduardo Cereto Carvalho's cross-browser implementation of addEventListener: