cdproto: github.com/chromedp/cdproto/cast Index | Files

package cast

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.

Index

Package Files

cast.go easyjson.go events.go types.go

Constants

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

Command names.

type DisableParams Uses

type DisableParams struct{}

DisableParams stops observing for sinks and issues.

func Disable Uses

func Disable() *DisableParams

Disable stops observing for sinks and issues.

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

func (*DisableParams) Do Uses

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

Do executes Cast.disable against the provided context.

func (DisableParams) MarshalEasyJSON Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams Uses

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 Uses

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 Uses

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

Do executes Cast.enable against the provided context.

func (EnableParams) MarshalEasyJSON Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

func (EnableParams) WithPresentationURL Uses

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

WithPresentationURL [no description].

type EventIssueUpdated Uses

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 Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventIssueUpdated) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*EventIssueUpdated) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventIssueUpdated) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

type EventSinksUpdated Uses

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 Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventSinksUpdated) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*EventSinksUpdated) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventSinksUpdated) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

type SetSinkToUseParams Uses

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 Uses

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 Uses

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

Do executes Cast.setSinkToUse against the provided context.

func (SetSinkToUseParams) MarshalEasyJSON Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetSinkToUseParams) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*SetSinkToUseParams) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetSinkToUseParams) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

type Sink Uses

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 Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Sink) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*Sink) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Sink) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

type StartTabMirroringParams Uses

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

StartTabMirroringParams starts mirroring the tab to the sink.

func StartTabMirroring Uses

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 Uses

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

Do executes Cast.startTabMirroring against the provided context.

func (StartTabMirroringParams) MarshalEasyJSON Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StartTabMirroringParams) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*StartTabMirroringParams) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StartTabMirroringParams) UnmarshalJSON Uses

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

UnmarshalJSON supports json.Unmarshaler interface

type StopCastingParams Uses

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

StopCastingParams stops the active Cast session on the sink.

func StopCasting Uses

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 Uses

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

Do executes Cast.stopCasting against the provided context.

func (StopCastingParams) MarshalEasyJSON Uses

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StopCastingParams) MarshalJSON Uses

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

MarshalJSON supports json.Marshaler interface

func (*StopCastingParams) UnmarshalEasyJSON Uses

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StopCastingParams) UnmarshalJSON Uses

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.