Skip to main content
Version: Phaser v4.0.0-rc.6

VideoFile

A single Video File suitable for loading by the Loader.

These are created when you use the Phaser.Loader.LoaderPlugin#video method and are not typically created directly.

For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#video.

Constructor

new VideoFile(loader, key, [urls], [noAudio])

Parameters

nametypeoptionaldefaultdescription
loaderPhaser.Loader.LoaderPluginNoA reference to the Loader that is responsible for this file.
keystring | Phaser.Types.Loader.FileTypes.VideoFileConfigNoThe key to use for this file, or a file configuration object.
urlsstring | Array.<string>Phaser.Types.Loader.FileTypes.VideoFileURLConfigArray.<Phaser.Types.Loader.FileTypes.VideoFileURLConfig>Yes
noAudiobooleanYesfalseDoes the video have an audio track? If not you can enable auto-playing on it.

Scope: static

Extends

Phaser.Loader.File

Source: src/loader/filetypes/VideoFile.js#L15
Since: 3.20.0

Inherited Methods

From Phaser.Loader.File:


Public Methods

load

<instance> load()

Description:

Called by the Loader, starts the actual file downloading.

During the load the methods onLoad, onError and onProgress are called, based on the XHR events.

You shouldn't normally call this method directly, it's meant to be invoked by the Loader.

Overrides: Phaser.Loader.File#load

Source: src/loader/filetypes/VideoFile.js#L92
Since: 3.20.0


onProcess

<instance> onProcess()

Description:

Called automatically by Loader.nextFile.

This method controls what extra work this File does with its loaded data.

Overrides: Phaser.Loader.File#onProcess

Source: src/loader/filetypes/VideoFile.js#L74
Since: 3.20.0


Inherited Members

From Phaser.Loader.File: