Media.getMarkerName method

The getMarkerName method retrieves the name of the marker at the specified index.

Syntax

strRetVal = Media.getMarkerName(
  markerNum
)

Parameters

markerNum [in]

Number (long) specifying a marker index.

Return value

This method returns a String.

Remarks

This method returns NULL if the specified marker does not exist.

Some digital media items do not contain markers. Use markerCount to find out how many markers are in the current clip.

Marker index numbers start at 1.

To use this method, read access to the library is required. For more information, see Library Access.

Examples

The following JScript example uses Media.getMarkerName to fill an HTML TEXTAREA element named MNAMES with the names of the markers in the current media item. The Player object was created with ID = "Player".

// Get the number of markers in the current media item.
var mcount = Player.currentMedia.markerCount;

// Verify that at least one marker exists in the current media.
if (mcount > 0){

// Loop through the marker list.
for (var i = 1; i < mcount + 1; i++){

   // Print the marker name to the text area.
   MNAMES.value += Player.currentMedia.getMarkerName(i);
   MNAMES.value += "\n";
}

Requirements

Version
Windows Media Player version 7.0 or later.
DLL
Wmp.dll

See also

Media Object

Media.getMarkerTime

Media.markerCount

Settings.mediaAccessRights

Settings.requestMediaAccessRights