This web page is an example of playing an MP3 file using Windows Media Player via ActiveX controls.
Note: You may need to wait for the music to play. The song is 4
min and is 4 megs as an mp3.
FYI: If you like the song, I have other songs that I've written at:
http://www.michael-thomas.com/music/originals
Link to the mp3 that is playing:
http://www.michael-thomas.com/music/originals/love/amazing_love_128k.mp3 -
click on this link and a new window with your default mp3 player will be
launched to play the mp3.
Here is the HTML code that is used. You can also do a view source to
see the HTML code:
<OBJECT ID="MediaPlayer1" width=360 height=162
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<PARAM NAME="FileName" VALUE="http://www.michael-thomas.com/music/originals/love/amazing_love_128k.mp3">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
<EMBED type="application/x-mplayer2"
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
SRC="./Pachelbel_Canon_in_D.mp3"
name="MediaPlayer1"
width=160
height=162
AutoStart=true>
</EMBED>
</OBJECT>