HTML Audio/Video DOM currentTime Property
Definition and Usage
The currentTime property sets or returns the current playback position (in seconds) of the audio/video.
Setting this property allows you to seek to a specific position in the audio/video.
Syntax
Return the currentTime property:
audio|video.currentTime
Set the currentTime property:
audio|video.currentTime = seconds
Property Values
| Value | Description |
|---|---|
| seconds | Specifies the playback position in seconds |
Technical Details
| Return Value: | A Number representing the current playback time in seconds |
| Default Value: | 0 |
Example
Set the video to start at 5 seconds:
document.getElementById("myVideo").currentTime = 5;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | Chrome |
Edge |
Firefox |
Safari |
Opera |
|---|---|---|---|---|---|
| currentTime | Yes | 9.0 | 3.5 | Yes | Yes |
YouTip
Chrome
Edge
Firefox
Safari
Opera