I am trying to get a youtube video to play in a fancybox popup window. The popup window comes up okay, but the video does not play. Firebug indicates that all the necessary elements are loading, but no video.
On this page everything works fine.
On this page the window pops up but no video.
Here is the html:
<div id="play-btn">
<a class="play-video" href="#flashArea1">Play Video</a>
</div>
<div style="display:none">
<div id="flashArea1" class="flashArea1" style="height:376;"><p>This content requires the Adobe Flash Player.<br /><a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />Get Flash</a></p>
</div>
<script type="text/javascript">
var mainswf = new SWFObject("youtube_player_standalone.swf", "main", "600", "250", "9", "#000000");
mainswf.addParam("scale", "noscale");
mainswf.addParam("wmode", "window");
mainswf.addParam("allowFullScreen", "true");
mainswf.addVariable("youtube_id", "_EC2tmFVNNE");
mainswf.addVariable("title", "Harry Potter and the Deathly Hallows");
mainswf.addVariable("controls_always_on", "false");
mainswf.addVariable("controls_fade_out_time", "5");
mainswf.addVariable("volume_cookie_on", "true");
mainswf.write("flashArea1");
</script>
</div><!-- end flash -->
Here is the jQuery that pops up the box:
<script type="text/javascript">
$(document).ready(function() {
$("a.play-video").fancybox({
'hideOnContentClick': false
});
});
</script>
I would appreciate any assistance. Thanks.