Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

HTML Audio/Video DOM currentTime Property

❮ HTML Audio/Video DOM Reference

Example

Set time position to 5 seconds:

let vid = document.getElementById("myVideo");
vid.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

The numbers in the table specify the first browser version that fully supports the property.

Property
currentTime Yes 9.0 3.5 Yes Yes

Syntax

Return the currentTime property:

audio|video.currentTime

Set the currentTime property:

audio|video.currentTime="seconds"

Property Values

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

Technical Details

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

❮ HTML Audio/Video DOM Reference