Showing posts with label fancybox. Show all posts
Showing posts with label fancybox. Show all posts

Wednesday, June 9, 2010

JW Player on Fancybox

Using the advise from this thread, here's how I got JW Player working inside FancyBox (to play FLV files in a lightbox):

<a id="viewflv" href="js/player.swf?file=video.flv&amp;autostart=1"
title="Test Flv">Click to view FLV video</a>
<script type="text/javascript"> //<![CDATA[
$(function() {
$("#viewflv").click(function() {
$.fancybox({
'autoscale' : false,
'transitionIn' : 'none',
'transitionOut': 'none',
'padding' : 0,
'title' : this.title,
'width' : 370,
'height' : 301,
'type' : 'swf',
'href' : this.href,
'swf' : { 'wmode':'transparent', 'allowfullscreen':'true' }
});

return false;
});
});
// ]]> </script>