Easy Tutorial
❮ Prop Url Readonly Jsref Small ❯

currentTime Property of Audio

Audio Object

Example

Set the time position to 1 second:

document.getElementById("myAudio").currentTime = 1;

Definition and Usage

The currentTime property sets or returns the current playback position of the audio in seconds.

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


Browser Support

All major browsers support the currentTime property.

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


Syntax

Return the currentTime property:

Set the currentTime property:

Property Values

Value Description
seconds Indicates the current playback position of the audio in seconds.

Technical Details

| Return Value: | A number representing the current playback time in seconds. | | --- | --- |

❮ Prop Url Readonly Jsref Small ❯