Disable audio/video autoplay

Ensures that HTML5 audio and video elements do not autoplay, based on http://diveintohtml5.info/examples/disable_video_autoplay.user.js

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
James Edward Lewis II
今日安裝
0
安裝總數
4,979
評價
26 0 2
版本
1.2.0
建立日期
2015-02-12
更新日期
2015-03-05
尺寸
4.9 KB
授權條款
未知
腳本執行於
所有網站

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: https://greasyfork.org/en/scripts/6487-pause-all-html5-videos-on-load

I have also incorporated more sophisticated anti-autoplay script based on Stop Youtube HTML5 Autoplay by Leslie P. Polzer of PORT ZERO [email protected]: http://www.port-zero.com/en/chrome-plugin-stop-html5-autoplay/

I added a workaround for the older Flash-based YouTube, based on this: http://userscripts-mirror.org/scripts/review/100858

I also added an attempted workaround for some videos on Tumblr, based on this: https://greasyfork.org/en/scripts/921-tumblr-disable-autoplay

For the benefit of those who would use this script in IE7Pro, I have used Eduardo Cereto Carvalho's cross-browser implementation of addEventListener: https://gist.github.com/eduardocereto/955642