Share via


Windows Media Player 11 SDK Media.markerCount 

Windows Media Player SDK banner art

Previous Next

Media.markerCount

The markerCount property retrieves the number of markers in the media item.

Syntax

  
    
  

Possible Values

This property is a read-only Number (long) specifying the number of markers in the file.

Remarks

This property returns zero if a file has no markers, or if the media item is not the same as Player.currentMedia.

Marker numbers start at 1.

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.markerCount to retrieve the number of markers in the current media item. That value is then used as the upper boundary for a looping structure, which iterates through the marker list to retrieve each marker name. An HTML TEXTAREA element named MNAMES displays the names of the markers in the current media item. The Player object was created with ID = "Player".

  

Requirements

Version: Windows Media Player version 7.0 or later.

Library: Use wmp.dll.

See Also

Previous Next