Archived Comments (locked)

in
Subscribe to Archived Comments 4 posts, 3 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
simon! Scriptwright

A great idea :)

Way to go!

 
Treviño User

Oooopsss... Sorry I sent the comment to the wrong page...

BTW, I love your script, so I wanted to port some of its feature back to the main "Youtube alternate player" script.

 
Treviño User

I've added the code (below) based on YouTotem after the 'else if(iCanHazSpanna){'; now I can use the alternate player to play the best video quality available ;)

if(pD) {	
			var z = null;
			var scripts = document.getElementsByTagName('script');
			for(var i = 0; i < scripts.length && z == null; ++i) {
				z = scripts[i].text.match(/video_id": "([^"]+).+, "t": "([^"]+)/);
			}
				
			if(z == null) {
				alert('Unable to find video source');
				return;
			}
			
			var videosrc = 'http://youtube.com/get_video?video_id=' + z[1]+ '&t=' + z[2];
			var quality = '18'
        		videosrc += '&fmt=' + quality;

			var spanTex = encodeURIComponent(videosrc);

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