// 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.
package cast // Code generated by cdproto-gen. DO NOT EDIT. import ( ) // 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. type EnableParams struct { PresentationURL string `json:"presentationUrl,omitempty"` } // 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 { return &EnableParams{} } // WithPresentationURL [no description]. func ( EnableParams) ( string) *EnableParams { .PresentationURL = return & } // Do executes Cast.enable against the provided context. func ( *EnableParams) ( context.Context) ( error) { return cdp.Execute(, CommandEnable, , nil) } // DisableParams stops observing for sinks and issues. type DisableParams struct{} // Disable stops observing for sinks and issues. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-disable func () *DisableParams { return &DisableParams{} } // Do executes Cast.disable against the provided context. func ( *DisableParams) ( context.Context) ( error) { return cdp.Execute(, CommandDisable, nil, nil) } // 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. type SetSinkToUseParams struct { SinkName string `json:"sinkName"` } // 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 ( string) *SetSinkToUseParams { return &SetSinkToUseParams{ SinkName: , } } // Do executes Cast.setSinkToUse against the provided context. func ( *SetSinkToUseParams) ( context.Context) ( error) { return cdp.Execute(, CommandSetSinkToUse, , nil) } // StartDesktopMirroringParams starts mirroring the desktop to the sink. type StartDesktopMirroringParams struct { SinkName string `json:"sinkName"` } // StartDesktopMirroring starts mirroring the desktop to the sink. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startDesktopMirroring // // parameters: // // sinkName func ( string) *StartDesktopMirroringParams { return &StartDesktopMirroringParams{ SinkName: , } } // Do executes Cast.startDesktopMirroring against the provided context. func ( *StartDesktopMirroringParams) ( context.Context) ( error) { return cdp.Execute(, CommandStartDesktopMirroring, , nil) } // StartTabMirroringParams starts mirroring the tab to the sink. type StartTabMirroringParams struct { SinkName string `json:"sinkName"` } // StartTabMirroring starts mirroring the tab to the sink. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startTabMirroring // // parameters: // // sinkName func ( string) *StartTabMirroringParams { return &StartTabMirroringParams{ SinkName: , } } // Do executes Cast.startTabMirroring against the provided context. func ( *StartTabMirroringParams) ( context.Context) ( error) { return cdp.Execute(, CommandStartTabMirroring, , nil) } // StopCastingParams stops the active Cast session on the sink. type StopCastingParams struct { SinkName string `json:"sinkName"` } // StopCasting stops the active Cast session on the sink. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-stopCasting // // parameters: // // sinkName func ( string) *StopCastingParams { return &StopCastingParams{ SinkName: , } } // Do executes Cast.stopCasting against the provided context. func ( *StopCastingParams) ( context.Context) ( error) { return cdp.Execute(, CommandStopCasting, , nil) } // Command names. const ( CommandEnable = "Cast.enable" CommandDisable = "Cast.disable" CommandSetSinkToUse = "Cast.setSinkToUse" CommandStartDesktopMirroring = "Cast.startDesktopMirroring" CommandStartTabMirroring = "Cast.startTabMirroring" CommandStopCasting = "Cast.stopCasting" )