interface PlaylistApi

Provides the means to manage the playlist.

When the player transitions from one source in the playlist to another (either by normal playback or by seeking), a PlayerEvent.PlaylistTransition event is emitted and the new source becomes active while the old one becomes inactive.

Accessible through Player.playlist.

Current event-related limitations

Per design, only SourceEvents for an active source are emitted from the Player. As not all source events are currently emitted per source (see current limitations on Source), some events that should only be emitted from the player for an active source can currently also be emitted for an inactive source in a playlist. The affected events will be gradually migrated to the expected behaviour (i.e. the player only emits source events for the active source, while the source itself emits all source events affecting that source).

For a list of source events that already work as expected per source, see Source.


Link copied to clipboard
abstract val sources: List<Source>
The list of Sources currently in the playlist.


Link copied to clipboard
abstract fun seek(source: Source, time: Double)
Seeks to the specified time in the specified source.