Phaser API Documentation

  Version: 
addMarker(key, markerIn, markerOut)

Description:

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 https://github.com/w3c/media-and-entertainment/issues/4 for more details about this issue.

Parameters:

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.

Returns:
Description:

This Video Game Object for method chaining.

Since: 3.20.0