NextMediaItemButton
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
: An AstroPlayerState
object that provides access to player state and information.
: Modifier to apply to the button (optional)
: Function to be called when the button is clicked (default: calls seekToNextMediaItem on astroPlayer)
: The vector asset to be used as the button icon (default: Icons.Outlined.SkipNext)
: A content description for accessibility (default: "Seek to next MediaItem")
: Boolean indicating whether the button is clickable (default: true)
: Colors to be applied to the button (default: IconButtonDefaults.iconButtonColors())
: 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).