public protocol 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 PlaylistTransition event is emitted and the new Source becomes active while the old one becomes inactive.

Accessible through Player.playlist.

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).

  • The list of Sources currently in the playlist. Exactly one source is always active in a playlist.



    var sources: [Source] { get }
  • Seeks to the specified time in the specified Source. The Source must be part of the playlist.

    Calling this method to seek to another source while casting will start playback automatically after the seek operation finished even if the player was paused previously. This is due to limitations on the CAF receiver.



    func seek(source: Source, time: TimeInterval)