Partager via


Retrieving Presentation Information (Windows Embedded CE 6.0)

1/6/2010

The Windows Media Player control supports streaming media content, as well as playback of local media content files.

The Windows Media Player control can render streaming media from computers running Windows Media Services and it can receive streamed content in one of two ways:

  • By connecting directly to the media server to receive stored or broadcast clips.
  • By monitoring a defined IP address and port (station) for multicast streams.

Many clips and stations contain information describing the media content. The Windows Media Player control exposes several attributes for retrieving this information.

Clips and Shows

The GetMediaInfoString method can retrieve the following information about the clip and show:

  • File name
  • Title
  • Description
  • Author
  • Copyright
  • Rating

Clip information can be stored in the media file, an Advanced Stream Redirector (ASX) file, or both. If the clip information is specified in an ASX file, the GetMediaInfoString method retrieves the information from the ASX file, overriding the information contained in the clip.

Additional information can be placed in PARAM tags for each show and clip within the ASX file. You can add as many PARAM tags per clip as you like, storing custom information such as "Director," "Producer," or links to related sites.

The information contained in PARAM tags is accessed with the GetMediaParameter method.

The following properties return information about the size and duration of each clip:

  • The ImageSourceHeight and ImageSourceWidth properties retrieve the original image size.
  • The Duration property retrieves the length of the clip, in seconds. To determine if this property contains valid data, check the value of the IsDurationValid property. (For example, during a broadcast the duration might be unknown.)

Stations

The Windows Media Player control uses Windows Media Station (.nsc) files to get the information it needs to receive multicast content over the Internet. These files can contain information such as stream location and rollover URL, as well as descriptive information about the station.

The Windows Media Player control exposes the following properties for retrieving station information.

  • The ChannelDescription property specifies a description of the station.
  • The ChannelName property specifies the name of the station.
  • The ChannelURL property specifies the location of the .nsc file.

Each channel has a contact responsible for the multicast. Channel contact properties include the following:

  • The ContactAddress property specifies the channel contact's address.
  • The ContactEmail property specifies the channel contact's e-mail name.
  • The ContactPhone property specifies the channel contact's phone number.

See Also

Concepts

Windows Media Player Control Application Development