Large

YouTube HD Ultimate

By Avindra V.G. Last update Dec 10, 2010 — Installed 402,053 times.

Auto-play buffering

in
Subscribe to Auto-play buffering 7 posts, 4 voices



aeosynth User

Could you make the videos start loading when auto-play is disabled? Sometimes my connection is slow so I always pause YouTube videos and let them buffer before I actually watch them.

Thanks

 
Avindra V.G. Script's Author

This is possible, with one flaw: I can make this script, but it will have to do a WHOLE-PAGE reload (the old, unpreferred method).

Are you comfortable with that?

 
aeosynth User

That's fine; I load youtube links in the background anyway. You couldn't just simulate a mouse click on the pause button?

 
JoeSimmons Scriptwright

How would you do it avg? and why a whole page reload?

 
Avindra V.G. Script's Author

If you want Joe, you can take over the script I was going to make from here.

This line should pause the video (might need to set a 300ms timeout or something for the flash object to load though):

unsafeWindow._gel("movie_player").pauseVideo()

Why a whole page reload? Because the pauseVideo function is eradicated for some reason after the SWF object is reloaded. Perhaps an actionscript bug?

 
cmagnuson User

I know that this is going to sound retarded but I tacked the 'unsafeWindow._gel("movie_player").pauseVideo()' line onto the end of the script and it doesn't seem to do anything. I quickly researched how to script a 300ms timeout but since I do not know Greasemonkey, I can't figure out how to do it. Is there any way someone can push me in the right direction?

BTW, I love this plugin. I work at YouTube and there is no way I could do my job effectively without it! I do second the vote for a start loading function when autoplay is disabled. Even on a fast connection I like to open multiple YouTube links at once so I can view or browse through them rapid fire.

 
Avindra V.G. Script's Author

Hi Charles. Are you a developer at YouTube? Perhaps you understand Flash and you can tell me why the pauseVideo() function is destroyed when the script reloads a video.

As for your question about a 300 ms timeout:

setTimeout(function(){
unsafeWindow._gel("movie_player").pauseVideo()
},300);

I'm not sure if this will work though. A lot of people reported this doesn't work. I know that the pauseVideo?does exist, and if I execute it on a YouTube page (not using Greasemonkey), it pauses the video.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel