I am trying to get JW Player to work inside Fancy Box. Fancy Box opens OK at the dimensions set below, but the video doesn't display (this is on a server). An example link that I'm using on a page (which is on the same level as the scripts and content diectories - the mp4 is in the content directory)
<a href='content/brat.mp4' class='video' data-width="600" data-height="345" title='me'>Robot</a>
and in the page:
$(".video").fancybox({
fitToView: false, // to show videos in their own size
content: '<span></span>', // create temp content
scrolling: 'no', // don't show scrolling bars in fancybox
afterLoad: function () {
// get dimensions from data attributes
var $width = $(this.element).data('width');
var $height = $(this.element).data('height');
// replace temp content
this.content = "<embed src='scripts/jwplayer/jwplayer.swf?file=" + this.href + "&autostart=true&wmode=opaque' type='application/x-shockwave-flash' width='" + $width + "' height='" + $height + "'></embed>";
}
});
in scripts/jwplayer/ there is jwplayer.flash.swf, jwplayer.js and jwplayer.html5.js