Hacking Some js
<p>So, I'm using Jilion's Sublime's <a href="http://sublimevideo.net/" rel="nofollow">HTML5 Video Player</a> on my site. And was wondering if there was a way to use some jQuery to animate my video player when certain events are triggered via the player?</p>

<p>For example when the play button is hit, the video player would shift into the center of the screen.</p>

<p>I had a dig around in the js for the player and it seems to be using things like "play", "pause", "finish" and "end" to trigger what the player does. What I was wondering is if I could that same technique as some jQuery that would say do this when "play" is hit: </p>

<pre><code>$('#video').animate({left: '350'}, "fast");
</code></pre>

<p>I understand this is sort of a hack job, could anyone point me in the direction of how I'd go about doing something like this.</p>

<p>Here's an example of the play function:</p>

<pre><code>o.play=function(a){if(a||this.ga==Dc)this.Z=0,this.coords=this.ec;else
if(this.Ga())return l;Ic(this);this.startTime=a=oa();-1==this.ga&amp;&amp;(this.startTime-
=this.duration*this.Z);this.ue=this.startTime+this.duration;this.rd=this.startTime;
this.Z||this.vd();this.la("play");-1==this.ga&amp;&amp;this.la("resume");this.ga=1;
var b=ia(this);b in Gc||(Gc[b]=this);Jc();Lc(this,a);return j};
</code></pre>

<p>Thanks in advance.</p>

<p>UPDATE: Ok, so this is what I've got at the moment, which seems to work.</p>

<pre><code>var v = document.getElementsByTagName("video")[0];
v.addEventListener("playing", function() { 
$('#video').animate({left: '-90'}, "fast");
},function(){
$('#video').animate({left: '-346'}, "fast");
});
</code></pre>
