Chrome DevTools Protocol

Methods

Media.disable

Disables the Media domain.

Media.enable

Enables the Media domain

Events

Media.playerErrorsRaised

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

parameters
playerId
PlayerId
errors
array[ PlayerError ]

Media.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.

parameters
playerId
PlayerId
events
array[ PlayerEvent ]

Media.playerMessagesLogged

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

parameters
playerId
PlayerId
messages
array[ PlayerMessage ]

Media.playerPropertiesChanged

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

parameters
playerId
PlayerId
properties
array[ PlayerProperty ]

Media.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.

parameters
players
array[ PlayerId ]

Types

Media.PlayerError

Corresponds to kMediaError

Type: object

properties
type
string
Allowed Values: pipeline_error, media_error
errorCode
string

When this switches to using media::Status instead of PipelineStatus we can remove "errorCode" and replace it with the fields from a Status instance. This also seems like a duplicate of the error level enum - there is a todo bug to have that level removed and use this instead. (crbug.com/1068454)

Media.PlayerEvent

Corresponds to kMediaEventTriggered

Type: object

properties
timestamp
Timestamp
value
string

Media.PlayerId

Players will get an ID that is unique within the agent context.

Type: string

Media.PlayerMessage

Have one type per entry in MediaLogRecord::Type Corresponds to kMessage

Type: object

properties
level
string

Keep in sync with MediaLogMessageLevel We are currently keeping the message level 'error' separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we're going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.

Allowed Values: error, warning, info, debug
message
string

Media.PlayerProperty

Corresponds to kMediaPropertyChange

Type: object

properties
name
string
value
string

Media.Timestamp

Type: number