androidx.media3.cast


Interfaces

CastPlayer.TransferCallback

Callback for moving state across players when transferring playback upon Cast session availability changes.

MediaItemConverter

Converts between MediaItem and the Cast SDK's MediaQueueItem.

SessionAvailabilityListener

Listener of changes in the cast session availability.

Classes

CastPlayer

Player implementation that can control playback both on the local device, and on a remote Cast device.

CastPlayer.Builder

Builder for CastPlayer.

DefaultCastOptionsProvider

A convenience OptionsProvider to target the default cast receiver app.

DefaultMediaItemConverter

Default MediaItemConverter implementation.

MediaRouteButtonFactory

A factory class to set up a media route button.

MediaRouteButtonViewProvider

A provider of a media route button view to be displayed in the player UI.

RemoteCastPlayer

Player implementation that communicates with a Cast receiver app.

RemoteCastPlayer.Builder

A builder for RemoteCastPlayer instances.

Top-level functions summary

Unit

A Material3 IconButton that displays a media route button.

Top-level functions

MediaRouteButton

@UnstableApi
@Composable
fun MediaRouteButton(modifier: Modifier = Modifier): Unit

A Material3 IconButton that displays a media route button.

Clicking the button displays the route chooser dialog for transferring media or the route controller dialog to control the remote playback. The default behavior prioritizes launching the system's route chooser / controller dialog if available and falls back to an in-app dialog otherwise.

The button's tint color can be customized by providing a LocalContentColor in the composition hierarchy.

 CompositionLocalProvider(LocalContentColor provides Color.Blue) {
MediaRouteButton(modifier = modifier)
}
Parameters
modifier: Modifier = Modifier

the Modifier to be applied to the button.