how to embed .wmv in html page and play / stop / change file using javascript?

2.6k Views Asked by At

I tried to find a good sample to teach me how to embed .wmv files to play in windows media player in the IE without the controls bar, and to be able to change the played files using js plus to be able to stop and play again.

tell me if you know a good sample.

1

There are 1 best solutions below

0
On

Though working with a Flash player or, even better, HTML5 video (if possible) would be better than using WMP here is some code (that I pulled from this page) that should get you started with placing a WMP object in a webpage:

<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer" WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>

I'm not sure of a good way to control it with JavaScript, though. Sorry.