HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML Audio/Video DOM currentTime Property

HTML audio Tag Reference HTML Audio/Video DOM Reference

Example

Set 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 position (in seconds) of the audio/video playback.

When setting this property, the playback will jump to the specified position.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The currentTime property is supported in all major browsers.

Note: This property is not supported in Internet Explorer 8 and earlier.


Syntax

Set the currentTime property:

audio|video.currentTime="seconds"

Return the currentTime property:

audio|video.currentTime

Property Values

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

Technical Details

Return Value: A Number, representing seconds


HTML audio Tag Reference HTML Audio/Video DOM Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE