embed WMP into web page (FireFox & IE) | GFisH-鱼的心情记事本
GFisH-鱼的心情记事本: embed WMP into web page (FireFox & IE)

Monday, February 16, 2009

embed WMP into web page (FireFox & IE)

we always facing problem while we want to embed a wmp into our web apge or blog. Either IE or Firefox not able to play the song file. i had just found a code that able to show wmp in both IE or Firefox and play the music properly.

<object id="Player" width="410" height="65" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">
<param value="http://xxxxxx/" name="URL"/>
<param value="1" name="AutoStart"/>
<param value="mini" name="uiMode"/>
<param value="1" name="PlayCount"/>
<param value="1" name="rate"/>
<param value="0" name="balance"/>
<param value="0" name="currentPosition"/>
<param value name="defaultFrame"/>
<param value="0" name="currentMarker"/>
<param value="-1" name="invokeURLs"/>
<param value name="baseURL"/>
<param value="50" name="volume"/>
<param value="0" name="mute"/>
<param value="0" name="stretchToFit"/>
<param value="-1" name="windowlessVideo"/>
<param value="-1" name="enabled"/>
<param value="-1" name="enableContextMenu"/>
<param value="0" name="fullScreen"/>
<param value name="SAMIStyle"/>
<param value name="SAMILang"/>
<param value name="SAMIFilename"/>
<param value name="captioningID"/>
<param value="0" name="enableErrorDialogs"/>

<embed bgcolor="black" autostart="True" loop="True" width="410" volume="90" autosize="-1" showcontrols="true" showstatusbar="1" showdisplay="0" displaysize="4" videoborder3d="-1" id="mediaPlayer" src="http://xxxxxx/" showtracker="-1" type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" height="68" designtimesp="5311"> </embed> </object>

you can found out that the code contains two difference part of codes, this is because FireFox and IE using difference method to embed wmp. The <object> is used by IE and <embed> is use by FireFox. just change the http://xxxxx/ to your online play list or file, then it will be ready to play. there also some options to control the player like auto start, volume control, please do modify the options to suit your needs.


@~David~@ a.k.a Crazy said...





Related Posts with Thumbnails