Phaser API Documentation

  Version: 
load(key)

Description:

Loads a Video from the Video Cache, ready for playback with the Video.play method.

If a video is already playing, this method allows you to change the source of the current video element. It works by first stopping the current video and then starts playback of the new source through the existing video element.

The reason you may wish to do this is because videos that require interaction to unlock, remain in an unlocked state, even if you change the source of the video. By changing the source to a new video you avoid having to go through the unlock process again.

Parameters:

name type description
key string

The key of the Video this Game Object will play, as stored in the Video Cache.

Returns:
Description:

This Video Game Object for method chaining.

Since: 3.60.0