Adding Audio

Adding Audio

In some browsers, no extra plug-in for MP3 or WAVE file format is needed. MP3 or WAV files can be hyperlinked without any <object> or <embed> tag as many browsers can play it but there is no control on interface of player. Hence flash is used for playing audio.

<a href=”music1.mp3”>music1 mp3</a>

But by including the audio file in <object> tag, browser will play it as per the type of plug-in value given and <object> tag technique may not play audio as different versions of browsers need different usage of the <object>, hence the <embed> tag is used inside an <object> element as shown

<object width=”300” height=”42” type=”audio/mpeg” data=”sound/play1.mp3”> <param name=”src” value=” sound/play1.mp3” /> <param name=”autoplay” value=”true” /> <param name=”autostart” value=”1” />

<embed src=” sound/play1.mp3” width=”300” height=”42” > </embed>

</object>

As explained earlier, the size of the player is as per the width and height attributes, the <param> tag and <embed> tag have same attributes. ‘classid’ attribute is used to specify media player installed on PC and if it is not installed, user needs to download it. Some values for different media players of classid attribute are

classid for Real Player: clsid:CFCDAA03 – 8BE4 – 11cf – B84B – 0020AFBBCCFA

classid for QuickTime: clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B

HTML 5 Multimedia tag
Flash for Audio

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?