cdproto: github.com/chromedp/cdproto/media Index | Files

package media

import "github.com/chromedp/cdproto/media"

Package media provides the Chrome DevTools Protocol commands, types, and events for the Media domain.

This domain allows detailed inspection of media elements.

Generated by the cdproto-gen command.

Index

Package Files

easyjson.go events.go media.go types.go

Constants

const (
    CommandEnable  = "Media.enable"
    CommandDisable = "Media.disable"
)

Command names.

type DisableParams Uses

type DisableParams struct{}

DisableParams disables the Media domain.

func Disable Uses

func Disable() *DisableParams

Disable disables the Media domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-disable

func (*DisableParams) Do Uses

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes Media.disable against the provided context.

func (DisableParams) MarshalEasyJSON Uses

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON Uses

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON Uses

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON Uses

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams Uses

type EnableParams struct{}

EnableParams enables the Media domain.

func Enable Uses

func Enable() *EnableParams

Enable enables the Media domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-enable

func (*EnableParams) Do Uses

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes Media.enable against the provided context.

func (EnableParams) MarshalEasyJSON Uses

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON Uses

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON Uses

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON Uses

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayerErrorsRaised Uses

type EventPlayerErrorsRaised struct {
    PlayerID PlayerID       `json:"playerId"`
    Errors   []*PlayerError `json:"errors"`
}

EventPlayerErrorsRaised send a list of any errors that need to be delivered.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerErrorsRaised

func (EventPlayerErrorsRaised) MarshalEasyJSON Uses

func (v EventPlayerErrorsRaised) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayerErrorsRaised) MarshalJSON Uses

func (v EventPlayerErrorsRaised) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventPlayerErrorsRaised) UnmarshalEasyJSON Uses

func (v *EventPlayerErrorsRaised) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayerErrorsRaised) UnmarshalJSON Uses

func (v *EventPlayerErrorsRaised) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayerEventsAdded Uses

type EventPlayerEventsAdded struct {
    PlayerID PlayerID       `json:"playerId"`
    Events   []*PlayerEvent `json:"events"`
}

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerEventsAdded

func (EventPlayerEventsAdded) MarshalEasyJSON Uses

func (v EventPlayerEventsAdded) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayerEventsAdded) MarshalJSON Uses

func (v EventPlayerEventsAdded) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventPlayerEventsAdded) UnmarshalEasyJSON Uses

func (v *EventPlayerEventsAdded) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayerEventsAdded) UnmarshalJSON Uses

func (v *EventPlayerEventsAdded) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayerMessagesLogged Uses

type EventPlayerMessagesLogged struct {
    PlayerID PlayerID         `json:"playerId"`
    Messages []*PlayerMessage `json:"messages"`
}

EventPlayerMessagesLogged send a list of any messages that need to be delivered.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerMessagesLogged

func (EventPlayerMessagesLogged) MarshalEasyJSON Uses

func (v EventPlayerMessagesLogged) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayerMessagesLogged) MarshalJSON Uses

func (v EventPlayerMessagesLogged) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventPlayerMessagesLogged) UnmarshalEasyJSON Uses

func (v *EventPlayerMessagesLogged) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayerMessagesLogged) UnmarshalJSON Uses

func (v *EventPlayerMessagesLogged) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayerPropertiesChanged Uses

type EventPlayerPropertiesChanged struct {
    PlayerID   PlayerID          `json:"playerId"`
    Properties []*PlayerProperty `json:"properties"`
}

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerPropertiesChanged

func (EventPlayerPropertiesChanged) MarshalEasyJSON Uses

func (v EventPlayerPropertiesChanged) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayerPropertiesChanged) MarshalJSON Uses

func (v EventPlayerPropertiesChanged) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventPlayerPropertiesChanged) UnmarshalEasyJSON Uses

func (v *EventPlayerPropertiesChanged) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayerPropertiesChanged) UnmarshalJSON Uses

func (v *EventPlayerPropertiesChanged) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayersCreated Uses

type EventPlayersCreated struct {
    Players []PlayerID `json:"players"`
}

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playersCreated

func (EventPlayersCreated) MarshalEasyJSON Uses

func (v EventPlayersCreated) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayersCreated) MarshalJSON Uses

func (v EventPlayersCreated) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventPlayersCreated) UnmarshalEasyJSON Uses

func (v *EventPlayersCreated) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayersCreated) UnmarshalJSON Uses

func (v *EventPlayersCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type PlayerError Uses

type PlayerError struct {
    Type      PlayerErrorType `json:"type"`
    ErrorCode string          `json:"errorCode"` // 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)
}

PlayerError corresponds to kMediaError.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerError

func (PlayerError) MarshalEasyJSON Uses

func (v PlayerError) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (PlayerError) MarshalJSON Uses

func (v PlayerError) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*PlayerError) UnmarshalEasyJSON Uses

func (v *PlayerError) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PlayerError) UnmarshalJSON Uses

func (v *PlayerError) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type PlayerErrorType Uses

type PlayerErrorType string

PlayerErrorType [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerError

const (
    PlayerErrorTypePipelineError PlayerErrorType = "pipeline_error"
    PlayerErrorTypeMediaError    PlayerErrorType = "media_error"
)

PlayerErrorType values.

func (PlayerErrorType) MarshalEasyJSON Uses

func (t PlayerErrorType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (PlayerErrorType) MarshalJSON Uses

func (t PlayerErrorType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (PlayerErrorType) String Uses

func (t PlayerErrorType) String() string

String returns the PlayerErrorType as string value.

func (*PlayerErrorType) UnmarshalEasyJSON Uses

func (t *PlayerErrorType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*PlayerErrorType) UnmarshalJSON Uses

func (t *PlayerErrorType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type PlayerEvent Uses

type PlayerEvent struct {
    Timestamp Timestamp `json:"timestamp"`
    Value     string    `json:"value"`
}

PlayerEvent corresponds to kMediaEventTriggered.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerEvent

func (PlayerEvent) MarshalEasyJSON Uses

func (v PlayerEvent) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (PlayerEvent) MarshalJSON Uses

func (v PlayerEvent) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*PlayerEvent) UnmarshalEasyJSON Uses

func (v *PlayerEvent) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PlayerEvent) UnmarshalJSON Uses

func (v *PlayerEvent) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type PlayerID Uses

type PlayerID string

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerId

func (PlayerID) String Uses

func (t PlayerID) String() string

String returns the PlayerID as string value.

type PlayerMessage Uses

type PlayerMessage struct {
    Level   PlayerMessageLevel `json:"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.
    Message string             `json:"message"`
}

PlayerMessage have one type per entry in MediaLogRecord::Type Corresponds to kMessage.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerMessage

func (PlayerMessage) MarshalEasyJSON Uses

func (v PlayerMessage) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (PlayerMessage) MarshalJSON Uses

func (v PlayerMessage) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*PlayerMessage) UnmarshalEasyJSON Uses

func (v *PlayerMessage) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PlayerMessage) UnmarshalJSON Uses

func (v *PlayerMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type PlayerMessageLevel Uses

type PlayerMessageLevel string

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerMessage

const (
    PlayerMessageLevelError   PlayerMessageLevel = "error"
    PlayerMessageLevelWarning PlayerMessageLevel = "warning"
    PlayerMessageLevelInfo    PlayerMessageLevel = "info"
    PlayerMessageLevelDebug   PlayerMessageLevel = "debug"
)

PlayerMessageLevel values.

func (PlayerMessageLevel) MarshalEasyJSON Uses

func (t PlayerMessageLevel) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (PlayerMessageLevel) MarshalJSON Uses

func (t PlayerMessageLevel) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (PlayerMessageLevel) String Uses

func (t PlayerMessageLevel) String() string

String returns the PlayerMessageLevel as string value.

func (*PlayerMessageLevel) UnmarshalEasyJSON Uses

func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*PlayerMessageLevel) UnmarshalJSON Uses

func (t *PlayerMessageLevel) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type PlayerProperty Uses

type PlayerProperty struct {
    Name  string `json:"name"`
    Value string `json:"value"`
}

PlayerProperty corresponds to kMediaPropertyChange.

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerProperty

func (PlayerProperty) MarshalEasyJSON Uses

func (v PlayerProperty) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (PlayerProperty) MarshalJSON Uses

func (v PlayerProperty) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*PlayerProperty) UnmarshalEasyJSON Uses

func (v *PlayerProperty) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PlayerProperty) UnmarshalJSON Uses

func (v *PlayerProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Timestamp Uses

type Timestamp float64

Timestamp [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-Timestamp

func (Timestamp) Float64 Uses

func (t Timestamp) Float64() float64

Float64 returns the Timestamp as float64 value.

Package media imports 7 packages (graph) and is imported by 2 packages. Updated 2021-01-07. Refresh now. Tools for package owners.