chrome-devtools-kotlin / org.hildan.chrome.devtools.domains.media / MediaDomain

MediaDomain

class MediaDomain

This domain allows detailed inspection of media elements

Functions

disable

Disables the Media domain.

suspend fun disable(): Unit

enable

Enables the Media domain

suspend fun enable(): Unit

events

Subscribes to all events related to this domain.

fun events(): Flow<MediaEvent>

playerErrorsRaised

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

fun playerErrorsRaised(): Flow<PlayerErrorsRaisedEvent>

playerEventsAdded

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.

fun playerEventsAdded(): Flow<PlayerEventsAddedEvent>

playerMessagesLogged

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

fun playerMessagesLogged(): Flow<PlayerMessagesLoggedEvent>

playerPropertiesChanged

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

fun playerPropertiesChanged(): Flow<PlayerPropertiesChangedEvent>

playersCreated

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

fun playersCreated(): Flow<PlayersCreatedEvent>