My favorites | Sign in
Logo
             
Search
for
Updated Oct 09, 2009 by aavindraa
v114  

1.1.4

Overall, cleaned up code and coding style. Other fixes:

Issues

true720p no longer works when big mode is enabled

Added "else"'s to logic.

Script calls function before it's defined (allowed, but stupid)

Moved addEventListener code to bottom..

In large resolutions, player tools overlaps the player options box

CSS Fixes.

time links don't always work

New code:

if(location.hash.match(/t=(?:(\d+)m)?(?:(\d+)s)?(\d*)/)) {
	var start=0;
	if(RegExp.$1) start += Number(RegExp.$1) * 60;
	if(RegExp.$2) start += Number(RegExp.$2);
	if(RegExp.$3) start += Number(RegExp.$3);
	swfArgs.start = start;
}

Requests

Loop graphic is sucky

Farthest I'll go with this is fixing alpha issues, unless someone wants to suggest a graphic.

Keyboard shortcuts for seeking forward / backward

		case 39: player.seekTo(player.getCurrentTime()+.5, true);return;
		case 37: player.seekTo(Math.round(player.getCurrentTime()-1), true);return;

Add ability to cancel page loading and still let script run

A lot of component-related fixes.

"Mini mode"

head.appendChild(new Element("a", {
	style : "font-size:12px;padding-top:3px;padding-left:3px;",
	onclick : function() {
		if(this.textContent=="mini mode on")
		{
			this.textContent = "mini mode off";
			if(opts.fit) {
				unsafeWindow.onresize = fitToWindow;
				fitToWindow();
			}
		} else {
			this.textContent = "mini mode on";
			player.style.height = "25px";
			unsafeWindow.onresize = null;
		}
	},
	textContent : "mini mode o" + (opts.min ? "n" : "ff")
}));

Keyboard shortcuts for controlling volume.

	if(E.ctrlKey)
		switch(E.keyCode) {
			case 38:
				E.preventDefault();
				player.setVolume(player.getVolume() + 4);
				return;
			case 40:
				E.preventDefault();
				player.setVolume(player.getVolume() - 4);
				return;
		}

if(!autoplay && !autobuffer) previewImage.show();

 ...
	swfArgs.iurl = "http://img.youtube.com/vi/"+unsafeWindow.pageVideoId+"/hqdefault.jpg";
 ...

Expand channel icon to maximum size

Simple enough:

var f = $("watch-channel-icon");
if(f) f.className="";

Other

Exposing "player" to unsafeWindow is not necessary

-unsafeWindow.player=player;

debugString is an utter mess in forums... reduce average string length

		for(var arg in swfArgs) if(arg.indexOf("rv")==0) delete swfArgs[arg];

Also, I added userAgent automatically to the string.


Sign in to add a comment
Hosted by Google Code