Windows Media Player SDK banner art
PreviousNext

Media Object

The Media object provides a way to specify or retrieve properties of a multimedia clip, using the following properties and methods.

The Media object supports the following properties.

Property Description
attributeCount Retrieves the number of attributes that can be queried and/or set for the media item.
duration Retrieves the duration in seconds of the current media item.
durationString Retrieves a String value indicating the duration of the current media item in HH:MM:SS format.
imageSourceHeight Retrieves the height of the current media item in pixels.
imageSourceWidth Retrieves the width of the current media item in pixels.
markerCount Retrieves the number of markers in the media item.
name Specifies or retrieves the name of the media item.
sourceURL Retrieves the URL of the current media item.

The Media object supports the following methods.

Method Description
getAttributeName Retrieves the name of the attribute corresponding to the specified index.
getItemInfo Retrieves the value of the specified attribute for the current media item.
getItemInfoByAtom Retrieves the value of the attribute with the specified index number.
getMarkerName Retrieves the name of the marker at the specified index.
getMarkerTime Retrieves the time of the marker at the specified index.
isIdentical Retrieves a value indicating whether the supplied object is the same as the current one.
isMemberOf Retrieves a value indicating whether the specified media item is a member of the specified playlist.
isReadOnlyItem Retrieves a value indicating whether the attributes of the specified media item can be edited.
setItemInfo Sets the value of the specified attribute for the media item.

The Media object is accessed through the following properties and methods.

Object Property or method
Controls currentItem
Player currentMedia
Playlist item

Because it is the most common means of access, player.currentMedia is used for purposes of illustration in the reference syntax sections.

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.