Phaser API Documentation

loadMediaStream(stream, [loadEvent], [noAudio])


Loads a Video from the given MediaStream object, ready for playback with the method.

You can control at what point the browser determines the video as being ready for playback via the loadEvent parameter. See for more details.


name type arguments Default description
stream string

The MediaStream object.

loadEvent string <optional> 'loadeddata'

The load event to listen for. Either loadeddata, canplay or canplaythrough.

noAudio boolean <optional> false

Does the video have an audio track? If not you can enable auto-playing on it.


This Video Game Object for method chaining.

Since: 3.50.0