pl.wendigo.chrome.domain.cast / CastDomain

CastDomain

class CastDomain (source)

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

Functions

disable

fun disable(): Single<ResponseFrame>

Stops observing for sinks and issues.

enable

fun enable(input: EnableRequest): Single<ResponseFrame>

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.

events

fun events(): Flowable<ProtocolEvent>

Returns flowable capturing all Cast domains events.

issueUpdated

fun issueUpdated(): Flowable<IssueUpdatedEvent>

This is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.

issueUpdatedTimed

fun issueUpdatedTimed(): Flowable<Timed<IssueUpdatedEvent>>

This is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.

setSinkToUse

fun setSinkToUse(input: SetSinkToUseRequest): Single<ResponseFrame>

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.

sinksUpdated

fun sinksUpdated(): Flowable<SinksUpdatedEvent>

This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.

sinksUpdatedTimed

fun sinksUpdatedTimed(): Flowable<Timed<SinksUpdatedEvent>>

This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.

startTabMirroring

fun startTabMirroring(input: StartTabMirroringRequest): Single<ResponseFrame>

Starts mirroring the tab to the sink.

stopCasting

fun stopCasting(input: StopCastingRequest): Single<ResponseFrame>

Stops the active Cast session on the sink.