I need some help on how to read taginfo (song/artist) from a online radiostream. I'm building my app in c# and I use the mediaelement.
When I play this steam in windows media player/winamp it show the current playing song.
I have tried the MarkerReached event, but nothing happens.
Here is the code I tried. I can't get it working.
string responseBodyAsText;
textblock.Text = "Click...";
Uri apiurl = new Uri("http://streamurl");
// create request
HttpClient client2 = new HttpClient();
client2.MaxResponseContentBufferSize = 2560;
client2.DefaultRequestHeaders.Add("user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36");
client2.DefaultRequestHeaders.Add("GET", "/"+apiurl.ToString()+ " HTTP/1.0");
client2.DefaultRequestHeaders.Add("Icy-MetaData", "1");
HttpResponseMessage response2 = await client2.GetAsync(apiurl);
//response2.EnsureSuccessStatusCode();
responseBodyAsText = await response2.Content.ReadAsStringAsync();
textblock.Text = responseBodyAsText.ToString();