js popup window to play .flv flash video using jwplayer.swf

Posted by Mike Trader on Stack Overflow See other posts from Stack Overflow or by Mike Trader
Published on 2010-05-21T18:58:11Z Indexed on 2010/05/21 19:00 UTC
Read the original article Hit count: 531

Filed under:
|

js popup window to play .flv using jwplayer.swf

I would like to adjust this code so that it does not crash the browser when expanded to full screen and the popup closes when it looses focus

<html>
<head>

<title>Popup Example</title>


<center>
<div class="yt_container">
<div id="yt_the_video" class="yt_video_full">

<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">
var s1 = new SWFObject("player.swf","ply","640","500","9","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.addParam("allownetworking","all");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars",'&file=GJClip.flv&autostart=true');
</script>

</head>

<body &#10;&#10;bgcolor="#CCCFFF">

<img alt="GJ" src="GJPlay.jpg"&#10;width="80" height="60" onClick="s1.write('yt_the_video');"&#10;&#10;</body>
</html>

I have to have many small thumbnails on a page and each one needs to open up to a full size (640x480) video with controls when clicked. Having looked at Shdowbox (dims web page behind it, not allowed to do that) and lightbox which I cannot get to work at all, I am down to a home gown solution, which I prefer anyway.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about flash