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
Number: time to jump to (in seconds).

반환값

Number: current time (in seconds).

관련 레퍼런스