Knowledgebase
How do I embed an MP3 file into my webpage?
Posted by Phil Parry on 18 September 2007 03:32 PM

First create the webpage that features the MP3s and insert the following code.

<!This code for IE>
<EMBED SRC="http://www.domain.com/example.mp3" HIDDEN="true" AUTOSTART="true" width="128" height="128">
<!This code for Netscape>
<OBJECT ID="MediaPlayer"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
standby="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject" width="239" height="179">

<PARAM NAME="FileName" VALUE=http://www.domain.com/example.mp3>
<PARAM NAME="AnimationatStart" VALUE="false">
<PARAM NAME="TransparentatStart" VALUE="true">
<PARAM NAME="AutoStart" VALUE="true">
<PARAM NAME="ShowControls" VALUE="0">

<Embed TYPE="application/x-mplayer2"
pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&"
SRC="http://www.domain.com/example.mp3"
Name=MediaPlayer
ShowControls=0
Width=2
Height=2
</embed>
</OBJECT>

(967 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).