Wednesday, July 23, 2008

Audio Streaming / Playing audio mp3 files in web page - HTML

How to play mp3 files in a web page - as streaming using some players available for free?...

First, lets try with windows media player.
Try this code...
<object id="MediaPlayer" height=46 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="filename" value="Bheema1.mp3">
<param name="Showcontrols" value="True">
<param name="autoStart" value="True">
<embed type="application/x-mplayer2" src="http://www.mix26.com/demo/Bheema1.mp3" name="MediaPlayer"></embed>
</object>

will Show this media player:








This one is from google... Google audio player.
<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mix26.com/demo/om_zaraare.mp3" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />

will Show:



This is from yahoo...
<embed src='http://webjay.org/flash/dark_player' width='400' height='40' wmode='transparent' flashVars='playlist_url=http://www.mix26.com/demo/marudhaani.mp3&rounded_corner=1&skin_color_1=0,0,0,0&skin_color_2=0,0,0,0' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer'/>

will Show:



And this one is very cute...
Add just a line (javascript) in your page and get the player...

http://mediaplayer.yahoo.com/

Cheers!

No comments: