cast

package
v0.0.0-...-640e031 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package cast provides the Chrome DevTools Protocol commands, types, and events for the Cast domain.

A domain for interacting with Cast, Presentation API, and Remote Playback API functionalities.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnable            = "Cast.enable"
	CommandDisable           = "Cast.disable"
	CommandSetSinkToUse      = "Cast.setSinkToUse"
	CommandStartTabMirroring = "Cast.startTabMirroring"
	CommandStopCasting       = "Cast.stopCasting"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisableParams

type DisableParams struct{}

DisableParams stops observing for sinks and issues.

func Disable

func Disable() *DisableParams

Disable stops observing for sinks and issues.

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

func (*DisableParams) Do

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

Do executes Cast.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 {
	PresentationURL string `json:"presentationUrl,omitempty"`
}

EnableParams starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.

func Enable

func Enable() *EnableParams

Enable starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.

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

parameters:

func (*EnableParams) Do

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

Do executes Cast.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

func (EnableParams) WithPresentationURL

func (p EnableParams) WithPresentationURL(presentationURL string) *EnableParams

WithPresentationURL [no description].

type EventIssueUpdated

type EventIssueUpdated struct {
	IssueMessage string `json:"issueMessage"`
}

EventIssueUpdated this is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.

See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#event-issueUpdated

func (EventIssueUpdated) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventIssueUpdated) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventIssueUpdated) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventIssueUpdated) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventSinksUpdated

type EventSinksUpdated struct {
	Sinks []*Sink `json:"sinks"`
}

EventSinksUpdated this is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.

See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#event-sinksUpdated

func (EventSinksUpdated) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventSinksUpdated) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventSinksUpdated) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventSinksUpdated) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetSinkToUseParams

type SetSinkToUseParams struct {
	SinkName string `json:"sinkName"`
}

SetSinkToUseParams sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.

func SetSinkToUse

func SetSinkToUse(sinkName string) *SetSinkToUseParams

SetSinkToUse sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.

See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-setSinkToUse

parameters:

sinkName

func (*SetSinkToUseParams) Do

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

Do executes Cast.setSinkToUse against the provided context.

func (SetSinkToUseParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetSinkToUseParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetSinkToUseParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetSinkToUseParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Sink

type Sink struct {
	Name    string `json:"name"`
	ID      string `json:"id"`
	Session string `json:"session,omitempty"` // Text describing the current session. Present only if there is an active session on the sink.
}

Sink [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#type-Sink

func (Sink) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Sink) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Sink) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Sink) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StartTabMirroringParams

type StartTabMirroringParams struct {
	SinkName string `json:"sinkName"`
}

StartTabMirroringParams starts mirroring the tab to the sink.

func StartTabMirroring

func StartTabMirroring(sinkName string) *StartTabMirroringParams

StartTabMirroring starts mirroring the tab to the sink.

See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startTabMirroring

parameters:

sinkName

func (*StartTabMirroringParams) Do

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

Do executes Cast.startTabMirroring against the provided context.

func (StartTabMirroringParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StartTabMirroringParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StartTabMirroringParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StartTabMirroringParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StopCastingParams

type StopCastingParams struct {
	SinkName string `json:"sinkName"`
}

StopCastingParams stops the active Cast session on the sink.

func StopCasting

func StopCasting(sinkName string) *StopCastingParams

StopCasting stops the active Cast session on the sink.

See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-stopCasting

parameters:

sinkName

func (*StopCastingParams) Do

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

Do executes Cast.stopCasting against the provided context.

func (StopCastingParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StopCastingParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StopCastingParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StopCastingParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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