AVQueuePlayer is a subclass of AVPlayer used to play a number of items in sequence. Using this class you can create and manage a queue of player items comprised of local or progressively downloaded file-based media, such as QuickTime movies or MP3 audio files, as well as media served using HTTP Live Streaming.


Creating a Queue Player

init(items: [AVPlayerItem])

Initializes an instance of AVQueuePlayer by enqueueing the player items from the specified array.

Managing the Player Queue

func items()

Returns an array of the currently enqueued items.

func advanceToNextItem()

Ends playback of the current item and initiates playback of the next item in the player’s queue.

func canInsert(AVPlayerItem, after: AVPlayerItem?)

Returns a Boolean value that indicates whether a given player item can be inserted into the player’s queue.

func insert(AVPlayerItem, after: AVPlayerItem?)

Places a player item after another player item in the queue.

func remove(AVPlayerItem)

Removes a given player item from the queue.

func removeAllItems()

Removes all player items from the queue.


Inherits From

Conforms To