Add mobile friendly Streaming Online Internet Radio using HTML5
Well like I have written before, first step is to find the streaming radio link. Please check my previous post for how to find it.
In this case we should also know what format the stream is. Most of the links are mp3. So I would take example of an mp3 shoutcast stream.
<audio controls="" preload="none" src="http://viadj.viastreaming.net:7189/;" type="audio/"></audio>
Preview of the embedded html5 audio element below. This will not be visible if your browser does not support HTML5 audio element or mp3 format.
Now in this element there are following fields.
Add/Embed online internet radio player on your blog/website
Search for the link to station which you want to embed.
Some examples are
Some sites/radio also provides playlist files such as .pls, .asx, .ram etc. Try to use these links directly, or download(use a download manager) these files and open using notepad to get the stream.
Some sites/radio will not have these playlist files, but just the player embedded. In this case use the view source or inspect element option in browser to examine the web page source and find the stream link.
<div id="movId" name="movId" align=center>
<object id="MediaPlayer1" 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" width="400" height="300">
<param id="FileName" name="FileName" value="">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="fullScreen" value="false">
<embed src="http://keralaradio.in/media/KeralaRadio.asx" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer" autostart="1" showcontrols="1" width="400" height="45">
</object>
</div>
In the code where ever the string "http://keralaradio.in/media/KeralaRadio.asx" is present, should be replaced by the link to internet radio station which you want to stream.
<param name="autoStart" value="false">
false to true and change in line no 10 autostart="1" to autostatrt="0"
And this will be the resullt of the above code.
Click the play button to start playing/streaming the radio station.