Xamarin Android C# Play Audio Stream (online Radio)
I have a URL of online-radio and I'd like to play it. So, I've done it this way: reading stream and writing it to byte array and playing it with audioTrack class. Here's the code:
Solution 1:
You can use the MediaPlayer class to stream audio by providing a URL.
MediaPlayer player = new MediaPlayer();
player.SetAudioStreamType (Stream.Music);
player.SetDataSource ("http://media.vmariel.ru:8000/puls");
player.Prepare();
player.Start();
Post a Comment for "Xamarin Android C# Play Audio Stream (online Radio)"