Silverlight MediaElement Source Title
-
20-09-2019 - |
Question
I'm using a MediaElement with this source:
http://origin-community.ministryofsound.com/asx/radio/mosRadio.asx
When I open it with Windows Media Player I get a title: "Ministry of Sound Radio", but I've seen the MediaElement properties and can't find this title.
Can anybody help me with this?
Thank you
Solution
It's stored in the Attributes of the MediaElemet, which are available in the MediaOpened event and after that. Looking at the attributes for your provided source, the key name is "TITLE".
void MyMediaElement_MediaOpened(object sender, RoutedEventArgs e)
{
tb1.Text = (sender as MediaElement).Attributes["TITLE"];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow