Share via


Windows Media Player 11 SDK Controls.currentMarkerĀ 

Windows Media Player SDK banner art

Previous Next

Controls.currentMarker

The currentMarker property specifies or retrieves the current marker number.

Syntax

  
    
  

Possible Values

This property is a read/write Number (long) with a default value of zero.

Remarks

Setting currentMarker causes playback to start from the specified marker. Before attempting to set currentMarker, determine whether a file has markers and how many it has by using markerCount. If a file has no markers, setting currentMarker to anything but zero results in an error. Setting currentMarker to a number higher than markerCount also results in an error.

The currentMarker property always returns the current or last marker, which means the actual file position can be either at the current marker or before the next marker. Markers are numbered beginning at 1, so if a file has markers, you can set currentMarker to zero to change the file position to zero.

Until the current media item is set (using Player**.URL** or Player**.currentMedia**), currentMarker returns zero.

Example Code

The following JScript example uses currentMarker to start video playback from the marker that corresponds to the selectedIndex property of an HTML SELECT element. 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