Reference time()

time()

Sets the media element's playback time.

The parameter, time, is optional. It's a number that specifies the time, in seconds, to jump to when playback begins.

Calling media.time() without an argument returns the number of seconds the audio/video has played.

Note: Time resets to 0 when looping media restarts.

Examples

Syntax

time()
time(time)

Parameters

time
Number:

time to jump to (in seconds).

Returns

Number: current time (in seconds).
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!

Related References

Complete your gift to make an impact