Documentation ¶
Overview ¶
Package media implements the Media domain. This domain allows detailed inspection of media elements
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type PlayerEvent
- type PlayerEventType
- type PlayerEventsAddedClient
- type PlayerEventsAddedReply
- type PlayerID
- 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 PlayerEvent ¶
type PlayerEvent struct { Type PlayerEventType `json:"type"` // No description. 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"` // No description. Value string `json:"value"` // No description. }
PlayerEvent
type PlayerEventType ¶
type PlayerEventType string
PlayerEventType Break out events into different types
const ( PlayerEventTypeNotSet PlayerEventType = "" PlayerEventTypePlaybackEvent PlayerEventType = "playbackEvent" PlayerEventTypeSystemEvent PlayerEventType = "systemEvent" PlayerEventTypeMessageEvent PlayerEventType = "messageEvent" )
PlayerEventType as enums.
func (PlayerEventType) String ¶
func (e PlayerEventType) String() string
func (PlayerEventType) Valid ¶
func (e PlayerEventType) Valid() bool
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 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,omitempty"` // No description. }
PlayerProperty Player Property type
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.