My favorites | Sign in
Logo
             
Search
for
Updated Aug 19, 2009 by aavindraa
Labels: Release
v11  

1.1

Avindra likes using the new Keyword

All instances of "create" have been replaced with "new Element" and the create function is now a constructor for the "Element"'s.

Cinema mode doesn't work fully due to update.

Apparently, due to the "longform shade" changing from #baseDiv to document.body. Code updated as follows:

	if(opts.autoCinema)
		document.body.className += " watch-lights-off";
	document.body.appendChild(new Element("div", {id : "watch-longform-shade", style : "height : "+document.body.offsetHeight + "px; display : " + (opts.autoCinema ? "" : "none")}));
	var head=$("watch-vid-title"), block=new Element("div", {
			id : "light-switch",
			className : "master-sprite " + (opts.autoCinema ? "dark" : "light"),
			onclick : function() {
				if (document.body.className.indexOf("watch-lights-off") > -1) {
					this.className=this.className.replace("dark", "light");
					$("watch-longform-shade").style.display = "none";
					document.body.className = document.body.className.replace("watch-lights-off", "");
				} else {
					this.className=this.className.replace("light", "dark");
					var shade = $("watch-longform-shade");
					shade.style.display = "inline";
					shade.style.height = document.body.offsetHeight + "px";
					document.body.className += " watch-lights-off";
				}
			}
	});

JavaScript Style doesn't support CSS3

Not a problem. Set style through the "style" attribute rather than the style object. I imagine this is faster anyway.

Block "ads" from other sites

Forcing the player to destroy variables "interstitial" and "watermark" from swfArgs takes care of this easily.

Partial DOM bloat on Option toggler

Required a "span" parent AND a "hLink" class, but YouTube fired their retarded developers, apparently, as this is no longer the case.

Click on play to pause / play breaks native support for it.

Beautiful! YouTube added support for this natively. I'd like to think I had some part in this ;)

Fixed by removing my smelly code for this purpose, which was just:

var playerCont=$("watch-player-div");
playerCont.style.position = "relative";
player.style.zIndex = 9000;
player.style.position = "relative";
playerCont.addEventListener("click", function(e) {
 var x = player.offsetWidth - e.layerX;
 var y = player.offsetHeight - e.layerY;
 if ((x >= 100 && x <= 125 && y >= 25 && y <= 90) || y <= 25) return;
 togglePlay();
}, false); 

Sign in to add a comment
Hosted by Google Code