Im trying to implement the latest fancybox (5.8.2011) that loads a video from our server using jwplayer. Unfortunately the fancybox website is quite bare and doesnt give a lot of informtation. So far here is my code:
HTML:
<div class="vidHolder">
<a href="HTTP://myserver.com/images/pathtofile/test_640.mp4"
class="fboxVid">
<img src="Assets/img/preview.jpg" alt="" />
</a>
</div>
javascript:
$(document).ready(function () {
$('.fboxVid').click(function () {
$.fancybox({
'title': this.title,
'content': '<embed src="player.swf?file=' + this.href + '&autostart=true&" type="application/x-shockwave-flash" width="352" height="240" wmode="opaque" allowfullscreen="true" allowscriptaccess="always"></embed>'
}); // fancybox
return false;
}); // click
}); // ready
In a nutshell, the window opens up and loads the flash player but the video doesnt play.
I get the feeling that its because I havent loaded the settings for jwplayer correctly but Im not sure how to go about this. For those who are interested my player swf file is in the document root (however, Im not seeing it with either firebug or chrome developer tools).
Thanks