import "github.com/chromedp/cdproto/cast"
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.
cast.go easyjson.go events.go types.go
const ( CommandEnable = "Cast.enable" CommandDisable = "Cast.disable" CommandSetSinkToUse = "Cast.setSinkToUse" CommandStartTabMirroring = "Cast.startTabMirroring" CommandStopCasting = "Cast.stopCasting" )
Command names.
type DisableParams struct{}
DisableParams stops observing for sinks and issues.
func Disable() *DisableParams
Disable stops observing for sinks and issues.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-disable
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Cast.disable against the provided context.
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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() *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 (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Cast.enable against the provided context.
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (p EnableParams) WithPresentationURL(presentationURL string) *EnableParams
WithPresentationURL [no description].
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 (v EventIssueUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventIssueUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventIssueUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventIssueUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 (v EventSinksUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventSinksUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventSinksUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventSinksUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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(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 (p *SetSinkToUseParams) Do(ctx context.Context) (err error)
Do executes Cast.setSinkToUse against the provided context.
func (v SetSinkToUseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetSinkToUseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetSinkToUseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetSinkToUseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
StartTabMirroringParams starts mirroring the tab to the sink.
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 (p *StartTabMirroringParams) Do(ctx context.Context) (err error)
Do executes Cast.startTabMirroring against the provided context.
func (v StartTabMirroringParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StartTabMirroringParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StartTabMirroringParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StartTabMirroringParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
StopCastingParams stops the active Cast session on the sink.
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 (p *StopCastingParams) Do(ctx context.Context) (err error)
Do executes Cast.stopCasting against the provided context.
func (v StopCastingParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StopCastingParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StopCastingParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StopCastingParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Package cast imports 6 packages (graph) and is imported by 2 packages. Updated 2021-01-08. Refresh now. Tools for package owners.