Help us shape the future of Go! Take the 2026 Go Developer Survey

cast

package
v0.159.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 1 Imported by: 3

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 pdlgen command.

Index

Constants

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

Command names.

Variables

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable stops observing for sinks and issues.

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

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

View Source
var IssueUpdated = cdp.Event[EventIssueUpdated]{Method: "Cast.issueUpdated"}

IssueUpdated 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

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

View Source
var SinksUpdated = cdp.Event[EventSinksUpdated]{Method: "Cast.sinksUpdated"}

SinksUpdated 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

StartDesktopMirroring starts mirroring the desktop to the sink.

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

StartTabMirroring starts mirroring the tab to the sink.

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

StopCasting stops the active Cast session on the sink.

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

Functions

This section is empty.

Types

type EnableParams

type EnableParams struct {
	PresentationURL string `json:"presentationUrl,omitempty,omitzero"`
}

EnableParams are the parameters of the command Cast.enable.

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 are the parameters of the command Cast.setSinkToUse.

type Sink

type Sink struct {
	Name    string `json:"name"`
	ID      string `json:"id"`
	Session string `json:"session,omitempty,omitzero"` // 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 are the parameters of the command Cast.startDesktopMirroring.

type StartTabMirroringParams

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

StartTabMirroringParams are the parameters of the command Cast.startTabMirroring.

type StopCastingParams

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

StopCastingParams are the parameters of the command Cast.stopCasting.

Jump to

Keyboard shortcuts

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