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

Audio currentTime Property

Audio Object Reference Audio Object

Example

Set time position to 1 second:

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

Try it yourself »


Definition and Usage

The currentTime property sets or returns the current position (in seconds) of the audio 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

Return the currentTime property:

audioObject.currentTime

Set the currentTime property:

audioObject.currentTime=seconds

Property Values

Value Description
seconds Specifies the position for the playback of the audio, in seconds

Technical Details

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


Audio Object Reference Audio Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook