CastApi class

A domain for interacting with Cast, Presentation API, and Remote Playback API functionalities.


CastApi(Client _client)


hashCode int
The hash code for this object.
no setterinherited
onIssueUpdated Stream<String>
This is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.
no setter
onSinksUpdated Stream<List<Sink>>
This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


disable() Future<void>
Stops observing for sinks and issues.
enable({String? presentationUrl}) Future<void>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
setSinkToUse(String sinkName) Future<void>
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.
startDesktopMirroring(String sinkName) Future<void>
Starts mirroring the desktop to the sink.
startTabMirroring(String sinkName) Future<void>
Starts mirroring the tab to the sink.
stopCasting(String sinkName) Future<void>
Stops the active Cast session on the sink.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.