I'm using SoundPlayer object to play audio on my web application in c# now. But when I tried to play .mp3 file it wasn't successful. How can I play mp3 file on a c# web application from a url? I'm having the url of the audio to be played.
This is the code I'm using to play .wav audio file, but it fails for .mp3 files.
SoundPlayer player = new SoundPlayer();
string sound url ="http://audio.oxforddictionaries.com/en/mp3/ranker_gb_1_8.mp3";
player.SoundLocation = soundurl;
player.Play();
System.Threading.Thread.Sleep(2000);
player.Stop();