Is there anyway to make it so a video doesn't play when I open it in a new tab but when I click over onto the new tab it auto-plays similar to chrome?
Hello! I recently moved from Google Chrome to FF and was wondering something, in chrome when you opened a new youtube video on a separate tab; it wouldn't swap over to it immediately and wouldn't auto-play until you tabbed over. Is there any way to do this without having to click the video or click somewhere on the video timeline? It's getting annoying.
すべての返信 (4)
Flash block {web link} Never be annoyed by a Flash animation again! Blocks Flash so it won't get in your way, but if you want to see it, just click on it
Firefox has a setting to disable autoplay of HTML5 videos, but it doesn't switch off and on depending on whether a tab is foreground or background.
I wonder how Chrome does that... Is it only on YouTube, so possibly a script in the page that someone could dig out and analyze, or does it work on Vimeo and other sites as well?
There does seem to be a way for add-ons to detect whether a page is in a background tab or foreground tab, so it should be possible to create this missing feature if no one finds another workaround: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API
I couldn't resist giving it a try. Since I don't write add-ons, I wrote a Greasemonkey userscript: https://greasyfork.org/en/scripts/22426-youtube-wait-for-me-pause-and-start-player-in-background-tabs
Unfortunately, the script isn't fast enough to stop the video from playing ever so briefly, I can't quite figure out Google's timing.
I just saw reference to a preference you might want to test out instead of the userscript or another add-on. I'm not sure why it is disabled by default; it might be a little buggy.
(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.
(2) In the search box above the list, type or paste media.b and pause while the list is filtered
(3) Double-click the media.block-play-until-visible preference to switch the value from false to true
If you use this, let us know if it works well and/or has any strange side effects.