MediaDomain

This domain allows detailed inspection of media elements

Official doc

Functions

Link copied to clipboard
suspend fun disable(): DisableResponse

Disables the Media domain.

Link copied to clipboard
suspend fun enable(): EnableResponse

Enables the Media domain

Link copied to clipboard
fun events(): Flow<MediaEvent>

Subscribes to all events related to this domain.

Link copied to clipboard

Send a list of any errors that need to be delivered.

Link copied to clipboard
Link copied to clipboard

Send events as a list, allowing them to be batched on the browser for less congestion. If batched, events must ALWAYS be in chronological order.

Link copied to clipboard

Send a list of any messages that need to be delivered.

Link copied to clipboard

This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.

Link copied to clipboard
Link copied to clipboard

Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive the full list of player ids and all events again.