I am building an audio streaming app using Windows 10 UWP MediaPlayer. Most streams are of type shoutcast/icecast mp3-stream with metadata about the program embedded in the stream itself.
My code for playing an audiostream is essentially like this:
mediaPlayer.Source = MediaSource.CreateFromUri(channelUri);
mediaPlayer.Play();
While I am perfectly capable of opening the same stream-url with a HttpClient, parsing the metadata and reading the info, this is not what I want. I need to get metadata every 10 sec or so and don't want to have two simultaneous sessions.
So I have two questions:
- Is the UWP MediaPlayer component capable of reading the metadata, and if so, how?
- If not, is it possible for me to open the stream via httpclient (or something else), read the metadata, then send the same stream to the MediaPlayer?
Example stream: http://sverigesradio.se/topsy/direkt/164-hi-mp3