0

I'm creating a MediaSource directly from a URI which serves an MP3 file:

MediaSource mediaSource = MediaSource.CreateFromUri(new Uri(urlStr));
var mediaPlayer = new MediaPlayer();
await mediaSource.OpenAsync();
mediaPlayer.Source = mediaSource;
MyXamlMediaPlayerElement.SetMediaPlayer(mediaPlayer);

Everything loads fine and it plays back fine. But how can I obtain the metadata? I can only find documentation on obtaining a MusicProperties object from a StorageFile. Creating a file first is not an option as it takes way too long.

Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
Sean O'Neil
  • 1,222
  • 12
  • 22
  • 2
    You might find [this page](https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/system-supported-metadata-cues) helpful. – kennyzx Sep 04 '18 at 08:37
  • There's a lot of good info in that document. Unfortunately my source isn't a HTTP Live Stream and cannot be made into an AdaptiveMediaSource. I don't think the framework can extract an ID3 tag from a MediaSource. The best I can do is manually find what I need the hard way. [This Q&A](https://stackoverflow.com/questions/16399604/how-to-read-id3v2-tag) helped. – Sean O'Neil Sep 04 '18 at 11:36

0 Answers0