HTML Audio/Video DOMcurrentTimeProperty

HTML Audio/Video DOM Reference Manual

Example

Set the time position to 5 seconds:

myVid=document.getElementById("video1");
myVid.currentTime=5;

Try it Yourself »

Definition and Usage

The currentTime property sets or returns the current playback position of the audio/video (in seconds).

When this property is set, playback jumps to the specified position.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the currentTime property.

Note:Internet Explorer 8 and earlier versions do not support this property.


Syntax

Set the currentTime property:

audio|video.currentTime="seconds"

Return the currentTime property:

audio|video.currentTime

Property value

Value Description
seconds Indicates the current playback position of the audio/video, in seconds.

Technical Details

Return value: Numeric value, representing seconds


HTML Audio/Video DOM Reference Manualother extensions