Phaser API Documentation

  Version: 
snapshot([width], [height])

Description:

Takes a snapshot of the current frame of the video and renders it to a CanvasTexture object, which is then returned. You can optionally resize the grab by passing a width and height.

This method returns a reference to the Video.snapshotTexture object. Calling this method multiple times will overwrite the previous snapshot with the most recent one.

Parameters:

name type arguments description
width number <optional>

The width of the resulting CanvasTexture.

height number <optional>

The height of the resulting CanvasTexture.

Since: 3.20.0