Audio currentTime attribute
Example
Set the time position to 1 second:
document.getElementById("myAudio").currentTime = 1;
Try it »
Definition and Usage
The currentTime attribute sets or returns the current position of audio playback (in seconds).
When this attribute is set, playback jumps to the specified position.
Browser support





All major browsers support the currentTime attribute.
Note: Internet Explorer 8 or earlier browsers do not support this attribute.
Syntax
Return the currentTime attribute:
audioObject
.currentTime
Set the currentTime attribute:
audioObject
.currentTime=
seconds
Attribute values
| Value | Description |
|---|---|
| seconds | Indicates the current position of audio playback (in seconds). |
Technical Details
| Return Value: | A number representing the current playback time (in seconds). |
|---|
Audio object