media

package
v0.0.0-...-8ed5860 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

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

Constants

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

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisableParams

type DisableParams struct{}

DisableParams disables the Media domain.

func Disable

func Disable() *DisableParams

Disable disables the Media domain.

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

func (*DisableParams) Do

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

Do executes Media.disable against the provided context.

func (DisableParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams enables the Media domain.

func Enable

func Enable() *EnableParams

Enable enables the Media domain.

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

func (*EnableParams) Do

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

Do executes Media.enable against the provided context.

func (EnableParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayerEventsAdded

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

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayerEventsAdded) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventPlayerEventsAdded) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayerEventsAdded) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayerPropertiesChanged

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

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayerPropertiesChanged) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventPlayerPropertiesChanged) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayerPropertiesChanged) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventPlayersCreated

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

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPlayersCreated) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventPlayersCreated) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPlayersCreated) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type PlayerEvent

type PlayerEvent struct {
	Type      PlayerEventType `json:"type"`
	Timestamp Timestamp       `json:"timestamp"` // Events are timestamped relative to the start of the player creation not relative to the start of playback.
	Name      string          `json:"name"`
	Value     string          `json:"value"`
}

PlayerEvent [no description].

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

func (PlayerEvent) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PlayerEvent) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PlayerEvent) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PlayerEvent) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type PlayerEventType

type PlayerEventType string

PlayerEventType break out events into different types.

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

const (
	PlayerEventTypeErrorEvent     PlayerEventType = "errorEvent"
	PlayerEventTypeTriggeredEvent PlayerEventType = "triggeredEvent"
	PlayerEventTypeMessageEvent   PlayerEventType = "messageEvent"
)

PlayerEventType values.

func (PlayerEventType) MarshalEasyJSON

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

MarshalEasyJSON satisfies easyjson.Marshaler.

func (PlayerEventType) MarshalJSON

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

MarshalJSON satisfies json.Marshaler.

func (PlayerEventType) String

func (t PlayerEventType) String() string

String returns the PlayerEventType as string value.

func (*PlayerEventType) UnmarshalEasyJSON

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

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*PlayerEventType) UnmarshalJSON

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

UnmarshalJSON satisfies json.Unmarshaler.

type PlayerID

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

func (t PlayerID) String() string

String returns the PlayerID as string value.

type PlayerProperty

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

PlayerProperty player Property type.

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

func (PlayerProperty) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PlayerProperty) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PlayerProperty) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PlayerProperty) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Timestamp

type Timestamp float64

Timestamp [no description].

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

func (Timestamp) Float64

func (t Timestamp) Float64() float64

Float64 returns the Timestamp as float64 value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL