Greasemonkey script to pause video playback on non-active tabs

霸气de小男生 提交于 2019-12-24 11:07:44

问题


Often when browsing in Firefox, I'll right click on a link, and open it in a separate tab to view later, and go on reading the current page. When the link is a Youtube script, however, playback starts immediately even though the tab isn't active. Other video players (like fora.tv and TED.com) don't start playback until you activate that tab.

Is there a greasemonkey script that I can use to make sure that videos (and especially Youtube videos) are paused unless their tab is active?


回答1:


I found two options:

"Youtube Alternate Video Player" (greasemonkey script) http://userscripts.org/scripts/show/13955

Script Summary: Replaces the youtube flash video player with FlowPlayer flash video player.

  • replaces the youtube player
  • no hd
  • no 16:9

Firefox Add-On "TubeStop" http://www.chrisfinke.com/addons/tubestop/

  • disables the autoplay on YouTube videos
  • does it every time (even if the tab is active)

I will keep the TubeStop addon for now.




回答2:


I think Youtube now does this by default (only playing a video when the tab the video is in is activated)



来源:https://stackoverflow.com/questions/847727/greasemonkey-script-to-pause-video-playback-on-non-active-tabs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!