JW FLV Media Player PHP Class > Basic
include_once 'class/JWFLVmediaplayerClass.php';
$playFile = 'cyndi.flv';
$playImage = 'cyndi.jpg';
$mplayer = new JWFLVmediaplayer();
$mplayer->setDivName('container');
$mplayer->setWidth('320');
$mplayer->setHeight('262');
$mplayer->setFile($playFile);
$mplayer->setImage($playImage);
echo $mplayer->GetPlayer();
<div id="container">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("mediaplayer.swf","mediaplayer","320","262","7");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("wmode","opaque");
s1.addVariable("shuffle","");
s1.addVariable("image","cyndi.jpg");
s1.addVariable("file","cyndi.flv");
s1.addVariable("width","320");
s1.addVariable("height","262");
s1.write("container");
</script>
You do not need to write javascript when you use JW FLV Media Player PHP Class.
When I let one page display it more than 2, I become convenient.
Next Move set div name is 'container2' and other FLV file & Image file.
$playFile = 'Cyndi_Wang-Ai_Ni.flv';
$playImage = 'Cyndi_Wang-Ai_Ni.jpg';
$mplayer->setDivName('container2');
$mplayer->setFile($playFile);
$mplayer->setImage($playImage);
echo $mplayer->GetPlayer();