ASP.NET - Add FM Radio in asp.net webpage - Asked By Jahir on 27-Jan-12 06:49 AM

how to add FM radio in webform and what is the coding for that ?
Jitendra Faye replied to Jahir on 27-Jan-12 06:54 AM

Windows Phone 7 has the FMRadio class (Microsoft.Devices.Radio namespace) that is ready to use:

FMRadio.Instance.PowerMode = RadioPowerMode.On;

but… there are couple of things to know:

The first time you will use it, chances are that you will get an UnauthorizedAccessDenied exception with an obscure "Access is denied" message.
The problem is that the Zune software must be closed…. but if you close Zune, now when you try to build or debug (F5 or Ctrl+F5) Visual Studio complains that it can't deploy to the device anymore: "Zune software is not launched. Retry after making sure that Zune software is launched."

So… you need to deploy the app to the device and then close Zune, debugging might be a problem as if you hit F5 then close Zune, the app will stop; but instead you can right-click on your project and select "Deploy":

Now you can close Zune and it should be ok, but the FM Radio only works with headset plugged or you'll get an error notification. You can check this by code:



try

{

FMRadio fmRadio = FMRadio.Instance;



fmRadio.PowerMode = RadioPowerMode.On;

fmRadio.CurrentRegion = RadioRegion.UnitedStates;

fmRadio.Frequency = 99.5;



if (FMRadio.Instance.SignalStrength == 0.0)

{

MessageBox.Show("Please connect your headset.");

}

}

catch (Exception ex)

{

MessageBox.Show(String.Format("Error: {0}\nClose the Zune
software or disconnect the phone from your computer.", ex.Message));

}
[)ia6l0 iii replied to Jahir on 27-Jan-12 07:33 AM
The above reply is for Windows Phone. 

For ASP.Net, in my opinion, you don't have many options. 

a) I believe FM radio stations support mms protocols. So you could use a flash player and link to the mms url. 
b) Otherwise, you should use components like http://www.aspnetaudio.com/  and provide the radio url.

Hope this information helps.
kalpana aparnathi replied to Jahir on 27-Jan-12 08:47 AM
hi,

Try this link:http://www.codeproject.com/Articles/32363/Building-FM-Radio-with-RDS-Support
Sri K replied to Jahir on 28-Jan-12 02:10 AM
check this link out : http://bytes.com/topic/visual-basic-net/answers/354542-internet-radio-project
For creating Internet Radio Station by free you can refer to this link below:

http://radio.about.com/od/createinternetradio/a/How-to-Create-Your-Own-Internet-Radio-Station_3.htm