参考 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.

示例

语法

time()
time(time)

参数

time
Number:

time to jump to (in seconds).

返回值

Number: current time (in seconds).
This page is generated from the comments in src/dom/dom.js . Please feel free to edit it and submit a pull request!

相关参考