Package-level declarations
Types
A data class representing a single media item in the AstroPlayer playlist.
A data class representing metadata associated with a media item in the AstroPlayer playlist. This data class provides optional fields for various metadata categories. Not all fields might be available for all media types, and the specific information available will depend on the media source and the player implementation.
The main class for controlling media playback.
The main class for controlling media playback.
An class representing the underlying native media player implementation.
An class representing the underlying native media player implementation.
An enum class representing the repeat mode of the AstroPlayer.
Properties
The metadata associated with the currently playing media item, or null if no item is playing or the item has no metadata.
Indicates whether there's a next media item available in the playlist after the current one.
Indicates whether there's a previous media item available in the playlist before the current one.
Functions
Registers a listener to receive notifications about playback and media state changes in AstroPlayer.
Attempts to convert a platform-specific MediaItem
object to an AstroMediaItem
object.
Converts a platform-specific MediaMetadata
object to an AstroMediaMetadata
object.
Converts an AstroMediaItem
object to a platform-specific MediaItem
object suitable for the underlying media player.
Creates a builder object for a platform-specific MediaItem
compatible with the underlying media player, pre-populated with data from the current AstroMediaItem
.
Converts an AstroMediaMetadata
object to a platform-specific MediaMetadata
object suitable for the underlying media player.
Creates a builder object for a platform-specific MediaMetadata
compatible with the underlying media player, pre-populated with data from the current AstroMediaItem.metadata
.
Clears the current playlist and then adds a single media item.
Clears the current playlist and then adds a single media item at a specific index.
Clears the current playlist and then adds a collection of media items.
Clears the current playlist and then adds a collection of media items at a specific index.
Unregisters a previously registered listener from receiving notifications from AstroPlayer.
Seeks the playback position backward by the specified number of milliseconds.
Seeks the playback position backward by the default seek backward increment.
Seeks the playback position forward by the specified number of milliseconds.
Seeks the playback position forward by the default seek forward increment.
Seeks the playback position to the end of the current media item.
Seeks to a specific media item and then sets the playback position within that item.
Seeks to the next media item in the playlist, if available.
Seeks to the previous media item in the playlist, if available.
Seeks the playback position to the beginning of the current media item.