Phaser API Documentation

addMarker(key, markerIn, markerOut)


Adds a sequence marker to this video.

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

You can then play back specific markers via the playMarker 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 for more details about this issue.


name type description
key string

A unique name to give this marker.

markerIn number

The time, in seconds, representing the start of this marker.

markerOut number

The time, in seconds, representing the end of this marker.


This Video Game Object for method chaining.

Since: 3.20.0