views:

459

answers:

1

Hello,

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

+1  A: 

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"];
    }
Jeff Wilcox
Ah... I was looking inside the object before the open event... Thank you Jeff!
Artur Carvalho
It doesn't work for sources like this: mms://195.245.168.21/antena3Do you know what can be the problem? The attributes are empty. Thanks in advance.
Artur Carvalho