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 ¶
const ( CommandEnable = "Cast.enable" CommandDisable = "Cast.disable" CommandSetSinkToUse = "Cast.setSinkToUse" CommandStartDesktopMirroring = "Cast.startDesktopMirroring" 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
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) 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
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
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
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
type StartDesktopMirroringParams ¶
type StartDesktopMirroringParams struct {
SinkName string `json:"sinkName"`
}
StartDesktopMirroringParams starts mirroring the desktop to the sink.
func StartDesktopMirroring ¶
func StartDesktopMirroring(sinkName string) *StartDesktopMirroringParams
StartDesktopMirroring starts mirroring the desktop to the sink.
See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startDesktopMirroring
parameters:
sinkName
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
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