UWP: Get Artist / Title of URL Webradio Stream

225 Views Asked by At

Is it possible to extract Artist / Title with the MediaPlayerElement / MediPlayer / MediaItem Classes in UWP, if it's delivered in the Web Stream? f.e. this URL https://swr-dasding-live.cast.addradio.de/swr/dasding/live/mp3/128/stream.mp3 delivers with the AIMP Radioplayer exactly the Artist / Title. But with my MediaPlayerElement I can't get this. I have already added events to the MediaItem. But they are only triggered the first time and give "0" back.

 using Windows.Media.Core;
 using Windows.Media.Playback;
////////// USINGS ABOVE ///
 MediaPlayer mp = new MediaPlayer();
 MediaSource _mediaSource = MediaSource.CreateFromUri(new Uri(https://swr-dasding-live.cast.addradio.de/swr/dasding/live/mp3/128/stream.mp3"));
 MediaPlaybackItem mpItem = new MediaPlaybackItem(_mediaSource);
 mpItem.AudioTracksChanged += PlaybackItem_AudioTracksChanged;
 mpItem.TimedMetadataTracksChanged += PlaybackItem_TimedMetadataTracksChanged;
 mpItem.VideoTracksChanged += PlaybackItem_VideoTracksChanged;
 mp.Source = mpItem;
 mp.Play();

Hope someone can give me a hint how to get this working. Thanks in advance Christian

0

There are 0 best solutions below