Windows Media Player 11 SDK Media.durationString
Previous | Next |
Media.durationString
The durationString property retrieves a String value indicating the duration of the current media item in HH:MM:SS format.
Syntax
Possible Values
This property is a read-only String.
Remarks
If this property is used with a media item other than the one specified in Player**.currentMedia**, it may not contain a valid value. If the media item is less than an hour long, the HH: portion of the return value is omitted.
To retrieve the value of this property, read access to the library is required. For more information, see Library Access.
Example Code
The following JScript example uses Media**.durationString** to display the duration of the current media item as formatted text. An HTML DIV element named MediaInfo displays the duration information. The Player object was created with ID = "Player".
Requirements
Version: Windows Media Player version 7.0 or later.
Library: Use wmp.dll.
See Also
- Media Object
- Media.duration
- Player.currentMedia
- Settings.mediaAccessRights
- Settings.requestMediaAccessRights
Previous | Next |