This is a jQuery component that let you play a Youtube® movie in a chromeless player. You can even use a movie as background of your HTML page.
$(function(){ $(".movie").mb_YTPlayer(); });
<a id="bgndVideo" href="http://www.youtube.com/watch?v=MR9av-I35ME" class="movie {opacity:.4, isBgndMovie:{width:'1990',mute:false}, ratio:'4/3'}">Bill Viola</a>
Set the HTML elements for the controls:
$.YTPlayer.controls.play= "<img src='images/play.png'>"
$.YTPlayer.controls.pause= "<img src='images/pause.png'>"
$.YTPlayer.controls.mute= "<img src='images/mute.png'>"
$.YTPlayer.controls.unmute= "<img src='images/unmute.png'>"
*metadata are parameters setted in the class attribute of the TAG.
For example:
<a id="bgndVideo" href="http://www.youtube.com/watch?v=MR9av-I35ME" class="movie {opacity:.4, isBgndMovie:{width:'1990',mute:false}, ratio:'4/3', quality:"hd720"}">Bill Viola</a>
To initialize a YTPlayer as simple player:
To initialize a YTPlayer as background:
To initialize a YTPlayer as element background (from v. 1.2.1):