Phaser API Documentation

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

Description:

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

You can control at what point the browser determines the video as being ready for playback via the loadEvent parameter. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement for more details.

Parameters:

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.

Returns:
Description:

This Video Game Object for method chaining.

Since: 3.50.0