Phaser API Documentation

  Version: 
playMarker(key, [loop])

Description:

Plays a pre-defined sequence in this video.

Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds and specified via the addMarker method.

Note that marker timing is not frame-perfect. You should construct your videos in such a way that you allow for plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy.

See https://github.com/w3c/media-and-entertainment/issues/4 for more details about this issue.

Parameters:

name type arguments Default description
key string

The name of the marker sequence to play.

loop boolean <optional> false

Should the video loop automatically when it reaches the end? Please note that not all browsers support seamless video looping for all encoding formats.

Returns:
Description:

This Video Game Object for method chaining.

Since: 3.20.0