Documentation
¶
Overview ¶
Package media implements the Media domain. This domain allows detailed inspection of media elements
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type PlayerError
- type PlayerErrorSourceLocation
- type PlayerErrorsRaisedClient
- type PlayerErrorsRaisedReply
- type PlayerEvent
- type PlayerEventsAddedClient
- type PlayerEventsAddedReply
- type PlayerID
- type PlayerMessage
- type PlayerMessagesLoggedClient
- type PlayerMessagesLoggedReply
- type PlayerPropertiesChangedClient
- type PlayerPropertiesChangedReply
- type PlayerProperty
- type PlayersCreatedClient
- type PlayersCreatedReply
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PlayerError ¶ added in v0.29.0
type PlayerError struct {
ErrorType string `json:"errorType"` // No description.
Code int `json:"code"` // Code is the numeric enum entry for a specific set of error codes, such as PipelineStatusCodes in media/base/pipeline_status.h
Stack []PlayerErrorSourceLocation `json:"stack"` // A trace of where this error was caused / where it passed through.
Cause []PlayerError `json:"cause"` // Errors potentially have a root cause error, ie, a DecoderError might be caused by an WindowsError
Data json.RawMessage `json:"data"` // Extra data attached to an error, such as an HRESULT, Video Codec, etc.
}
PlayerError Corresponds to kMediaError
type PlayerErrorSourceLocation ¶ added in v0.33.0
type PlayerErrorSourceLocation struct {
File string `json:"file"` // No description.
Line int `json:"line"` // No description.
}
PlayerErrorSourceLocation Represents logged source line numbers reported in an error. NOTE: file and line are from chromium c++ implementation code, not js.
type PlayerErrorsRaisedClient ¶ added in v0.29.0
type PlayerErrorsRaisedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*PlayerErrorsRaisedReply, error)
rpcc.Stream
}
PlayerErrorsRaisedClient is a client for PlayerErrorsRaised events. Send a list of any errors that need to be delivered.
type PlayerErrorsRaisedReply ¶ added in v0.29.0
type PlayerErrorsRaisedReply struct {
PlayerID PlayerID `json:"playerId"` // No description.
Errors []PlayerError `json:"errors"` // No description.
}
PlayerErrorsRaisedReply is the reply for PlayerErrorsRaised events.
type PlayerEvent ¶
type PlayerEvent struct {
Timestamp Timestamp `json:"timestamp"` // No description.
Value string `json:"value"` // No description.
}
PlayerEvent Corresponds to kMediaEventTriggered
type PlayerEventsAddedClient ¶
type PlayerEventsAddedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*PlayerEventsAddedReply, error)
rpcc.Stream
}
PlayerEventsAddedClient is a client for PlayerEventsAdded events. 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.
type PlayerEventsAddedReply ¶
type PlayerEventsAddedReply struct {
PlayerID PlayerID `json:"playerId"` // No description.
Events []PlayerEvent `json:"events"` // No description.
}
PlayerEventsAddedReply is the reply for PlayerEventsAdded events.
type PlayerID ¶
type PlayerID string
PlayerID Players will get an ID that is unique within the agent context.
type PlayerMessage ¶ added in v0.29.0
type PlayerMessage struct {
// Level 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.
//
// Values: "error", "warning", "info", "debug".
Level string `json:"level"`
Message string `json:"message"` // No description.
}
PlayerMessage Have one type per entry in MediaLogRecord::Type Corresponds to kMessage
type PlayerMessagesLoggedClient ¶ added in v0.29.0
type PlayerMessagesLoggedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*PlayerMessagesLoggedReply, error)
rpcc.Stream
}
PlayerMessagesLoggedClient is a client for PlayerMessagesLogged events. Send a list of any messages that need to be delivered.
type PlayerMessagesLoggedReply ¶ added in v0.29.0
type PlayerMessagesLoggedReply struct {
PlayerID PlayerID `json:"playerId"` // No description.
Messages []PlayerMessage `json:"messages"` // No description.
}
PlayerMessagesLoggedReply is the reply for PlayerMessagesLogged events.
type PlayerPropertiesChangedClient ¶
type PlayerPropertiesChangedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*PlayerPropertiesChangedReply, error)
rpcc.Stream
}
PlayerPropertiesChangedClient is a client for PlayerPropertiesChanged events. This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.
type PlayerPropertiesChangedReply ¶
type PlayerPropertiesChangedReply struct {
PlayerID PlayerID `json:"playerId"` // No description.
Properties []PlayerProperty `json:"properties"` // No description.
}
PlayerPropertiesChangedReply is the reply for PlayerPropertiesChanged events.
type PlayerProperty ¶
type PlayerProperty struct {
Name string `json:"name"` // No description.
Value string `json:"value"` // No description.
}
PlayerProperty Corresponds to kMediaPropertyChange
type PlayersCreatedClient ¶
type PlayersCreatedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*PlayersCreatedReply, error)
rpcc.Stream
}
PlayersCreatedClient is a client for PlayersCreated events. 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.
type PlayersCreatedReply ¶
type PlayersCreatedReply struct {
Players []PlayerID `json:"players"` // No description.
}
PlayersCreatedReply is the reply for PlayersCreated events.
type Timestamp ¶
type Timestamp float64
Timestamp
func (Timestamp) MarshalJSON ¶
MarshalJSON implements json.Marshaler. Encodes to null if t is zero.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.