NextMediaItemButton

fun NextMediaItemButton(astroPlayerState: AstroPlayerState, modifier: Modifier = Modifier, onClick: () -> Unit = { astroPlayerState.astroPlayer.seekToNextMediaItem() }, imageVector: ImageVector = Icons.Outlined.SkipNext, contentDescription: String = "Seek to next MediaItem", enabled: Boolean = true, colors: IconButtonColors = IconButtonDefaults.iconButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

A composable function that renders a button to seek to the next media item in a player.

This function is a wrapper around the standard IconButton composable with logic to handle enabling/disabling based on the availability of a next media item in the AstroPlayerState.

Parameters

astroPlayerState

: An AstroPlayerState object that provides access to player state and information.

modifier

: Modifier to apply to the button (optional)

onClick

: Function to be called when the button is clicked (default: calls seekToNextMediaItem on astroPlayer)

imageVector

: The vector asset to be used as the button icon (default: Icons.Outlined.SkipNext)

contentDescription

: A content description for accessibility (default: "Seek to next MediaItem")

enabled

: Boolean indicating whether the button is clickable (default: true)

colors

: Colors to be applied to the button (default: IconButtonDefaults.iconButtonColors())

interactionSource

: A MutableInteractionSource object to provide information about user interactions (default: a new instance)

This function checks if there's a next media item using astroPlayerState.hasNextMediaItem before enabling the button. Clicking the button triggers the provided onClick function (default: seeks to the next media item).