Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Video currentTime Property

Video currentTime property

Video Object Reference The Video object

Example

Set the time position to 5 seconds:

document.getElementById("myVideo").currentTime = 5;

Try it »


Definition and Usage

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

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


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the currentTime attribute.

**Note:** Internet Explorer 8 or earlier browsers do not support this property.


Syntax

Return the currentTime attribute:

videoObject

.currentTime

Set the currentTime attribute:

videoObject

.currentTime=

seconds

Attribute values

Value Description
seconds Describes the current playback position of the video (in seconds).

Technical Details

Return Value: A numeric value representing the current playback time, in seconds

Video Object Reference The Video object