Controls.currentPositionString

The currentPositionString property retrieves the current position in the media item as a String formatted as HH:MM:SS (hours, minutes, and seconds).

player.controls.currentPositionString
      

Possible Values

This property is a read-only String.

Remarks

If the media item is less than an hour long, the HH: portion is not included.

Note  You should include code to stop the timer when the media item is stopped or paused.

Examples

The following JScript example starts an HTML timer that displays the current position of the media file at one-second intervals. An HTML TEXT element named MyText was created to display the current position. The Player object was created with ID = "Player".



var timer = window.setInterval("MyText.value = Player.controls.currentPositionString",1000);


Requirements

Version

Windows Media Player version 7.0 or later.

DLL

Wmp.dll

See also

Controls Object

 

 

Community Additions

ADD
Show:
© 2014 Microsoft