How to Put a Windows Media Player on a Website
- 1). Open your HTML editor.
- 2). Find the location within your HTML code where you want to have your Windows Media Player video. The higher up in your HTML code you have it, the closer to the top of the Web page the video will be displayed.
- 3). Insert the following code in the location that you specified in Step 2:
<OBJECT 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="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="192" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT> - 4). Change "Videofilename.wmv" within the code to your Windows Media Player file name. For example, if your video file is called "boyfeedsdog.wmv," then change "Videofilename.wmv" to "boyfeedsdog.wmv" within the code. There are two spots where you need to change the name; after "PARAM NAME="FileName" VALUE=" towards the top and after "<EMBED TYPE="application/x-mplayer2" SRC=" towards the bottom.
- 5). Change the "trues" and "falses" as you see fit throughout the code. This will turn these parameters on and off. If you want the video to play automatically, then set the value next to "autostart" to "true." If you want the video to show controls such as pause and stop buttons, set "showcontrols" to "true," and if you want the status bar to be seen by the user, set "showstatusbar" to "true."
- 6). Alter the size of the video on the page with the "width" and "height" measurements. In the example code in Step 3, the width is 192 pixels and the height is 190 pixels. You can see this in the line: OBJECT at the top of the code. The larger these numbers are, the larger your video will be displayed on your Web page.
- 7). Align the parameters you set in the top two-thirds of the code with the "ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0">" part of the code. For each "true" value you set above, set the number to "1" and for each "false" value that you set above, the number should be "0." For example, if your ShowControls parameter is set to false then change the number to "0" in this portion of the code.
- 8). Align the measurements set in the top two-thirds of the code with the "<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="192" part of the code. Change the width and the height measurement to what you set them to in Step 6. For example, if you set the width to 300 pixels and the height to 250 pixels, then this portion of the code should read: "<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="300" - 9). Save your HTML code that contains the Windows Media Player video like you would save it for other Web pages that you published. This depends completely on the system that you publish your site or blog on. Some publishing systems will have functionality that allows you to hit a "Save" or "Publish" button.