-
public final class CastDomainA domain for interacting with Cast, Presentation API, and Remote Playback API functionalities.
-
-
Method Summary
Modifier and Type Method Description final Flow<CastEvent>events()Subscribes to all events related to this domain. final Flow<CastEvent.SinksUpdatedEvent>sinksUpdated()This is fired whenever the list of available sinks changes. final Flow<CastEvent.IssueUpdatedEvent>issueUpdated()This is fired whenever the outstanding issue/error message changes. final Unitenable(EnableRequest input)Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. final Unitdisable()Stops observing for sinks and issues. final UnitsetSinkToUse(SetSinkToUseRequest input)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. final UnitstartTabMirroring(StartTabMirroringRequest input)Starts mirroring the tab to the sink. final UnitstopCasting(StopCastingRequest input)Stops the active Cast session on the sink. -
-
Method Detail
-
sinksUpdated
final Flow<CastEvent.SinksUpdatedEvent> 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.
-
issueUpdated
final Flow<CastEvent.IssueUpdatedEvent> issueUpdated()
This is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.
-
enable
final Unit enable(EnableRequest input)
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.
-
setSinkToUse
final Unit setSinkToUse(SetSinkToUseRequest input)
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.
-
startTabMirroring
final Unit startTabMirroring(StartTabMirroringRequest input)
Starts mirroring the tab to the sink.
-
stopCasting
final Unit stopCasting(StopCastingRequest input)
Stops the active Cast session on the sink.
-
-
-
-