Wednesday, February 21, 2007

Embedding Windows Media Player in your blog or webpage

Embedding windows media player in your blog or webpage


It is very easy to embed media player. You just need to have media files which you would like to play in your page or post.




Copy paste the following HTML code to embed windows media player where ever you wish. (left or right side bar or within your post as I have done above)
<object id="MediaPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="WIDTH: 250px; HEIGHT: 200px" width="300" height="200" type="application/x-oleobject">
<param value="URL_VALUE>" name="URL"/>
<param value="1" name="rate"/>
<param value="0" name="balance"/>
<param value="0" name="currentPosition"/>
<param value="" name="defaultFrame"/>
<param value="1" name="playCount"/>
<param value="-1" name="autoStart"/>
<param value="0" name="currentMarker"/>
<param value="-1" name="invokeURLs"/>
<param value="" name="baseURL"/>
<param value="80" name="volume"/>
<param value="0" name="mute"/>
<param value="full" name="uiMode"/>
<param value="-1" name="stretchToFit"/>
<param value="0" name="windowlessVideo"/>
<param value="-1" name="enabled"/>
<param value="0" name="enableContextMenu"/>
<param value="1" name="fullScreen"/>
<param value="" name="SAMIStyle"/>
<param value="" name="SAMILang"/>
<param value="" name="SAMIFilename"/>
<param value="" name="captioningID"/>
<param value="0" name="enableErrorDialogs"/>
<param value="10742" name="_cx"/>
<param value="10266" name="_cy"/>
</object>

I have tested this in IE and Firefox and both seems to work fine. In the URL_VALUE (shown in bold above) provide the URL where you have your media files.

1 comment:

Unknown said...

I have used object tag for playing .wmv files. It works fine for IE but in Firefox videos dont play. If i use direct downloading and playing, i get nothing. But when i use buffering concept then black screen comes. I'll be really thankful if someone gives me a solution for this.