Interface RoutableCastController
-
- All Implemented Interfaces:
@MainThread()@ApiStatus.Experimental() public interface RoutableCastController
The cast API a routable integration reports through.
It only has an effect when the integration's RoutableIntegrationHandler.cast is implemented: the integration is then exposed as com.theoplayer.android.api.cast.Cast.getIntegrations under its identifier, and takes part in com.theoplayer.android.api.cast.Cast.isCasting.
-
-
Method Summary
Modifier and Type Method Description abstract UnitsetState(PlayerCastState state)Changes the cast state of the integration. abstract Uniterror(Throwable error)Reports a non-fatal cast error, as com.theoplayer.android.api.event.cast.VendorCastEventTypes.ERROR on the integration's com.theoplayer.android.api.cast.RoutableCast. abstract PlayerCastStategetState()The cast state of the integration, PlayerCastState.UNAVAILABLE by default. -
-
Method Detail
-
setState
abstract Unit setState(PlayerCastState state)
Changes the cast state of the integration.
Dispatches com.theoplayer.android.api.event.cast.VendorCastEventTypes.STATECHANGE on the integration's com.theoplayer.android.api.cast.RoutableCast when the state changes, and com.theoplayer.android.api.event.cast.CastEventTypes.CASTINGCHANGE on the player's cast API when com.theoplayer.android.api.cast.Cast.isCasting changes.
Does nothing when the integration's RoutableIntegrationHandler.cast is not implemented.
-
error
abstract Unit error(Throwable error)
Reports a non-fatal cast error, as com.theoplayer.android.api.event.cast.VendorCastEventTypes.ERROR on the integration's com.theoplayer.android.api.cast.RoutableCast.
-
getState
abstract PlayerCastState getState()
The cast state of the integration, PlayerCastState.UNAVAILABLE by default.
-
-
-
-