cast
IssueUpdated
dataclass
This is fired whenever the outstanding issue/error message changes.
issueMessage
is empty if there is no issue.
Source code in zendriver/cdp/cast.py
Sink
dataclass
Source code in zendriver/cdp/cast.py
id_: str
instance-attribute
name: str
instance-attribute
session: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(name, id_, session=None)
from_json(json)
classmethod
SinksUpdated
dataclass
This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.
Source code in zendriver/cdp/cast.py
disable()
enable(presentation_url=None)
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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
presentation_url
|
Optional[str]
|
(Optional) |
None
|
Source code in zendriver/cdp/cast.py
set_sink_to_use(sink_name)
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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sink_name
|
str
|
|
required |
Source code in zendriver/cdp/cast.py
start_desktop_mirroring(sink_name)
Starts mirroring the desktop to the sink.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sink_name
|
str
|
|
required |
Source code in zendriver/cdp/cast.py
start_tab_mirroring(sink_name)
Starts mirroring the tab to the sink.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sink_name
|
str
|
|
required |
Source code in zendriver/cdp/cast.py
stop_casting(sink_name)
Stops the active Cast session on the sink.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sink_name
|
str
|
|
required |