Phaser API Documentation

  Version: 
setCurrentTime(value)

Description:

Seeks to a given playback time in the video. The value is given in seconds or as a string.

Seeking only works if the video has a duration, so will not work for live streams.

When seeking begins, this video will emit a seeking event. When the video completes seeking (i.e. reaches its designated timestamp) it will emit a seeked event.

You can provide a string prefixed with either a + or a -, such as +2.5 or -2.5. In this case it will seek to +/- the value given, relative to the current time.

If you wish to seek based on a duration percentage instead, use the Video.seekTo method.

Parameters:

name type description
value string | number

The playback time to seek to in seconds. Can be expressed as a string, such as +2 to seek 2 seconds ahead from the current time.

Returns:
Description:

This Video Game Object for method chaining.

Since: 3.20.0