Instance Method

canInsertItem:afterItem:

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

Declaration

- (BOOL)canInsertItem:(AVPlayerItem *)item afterItem:(AVPlayerItem *)afterItem;

Parameters

item

The AVPlayerItem object to test.

afterItem

The item that item is to follow in the queue. Pass nil to test whether item can be appended to the queue.

Return Value

YES if item can be appended to the queue, otherwise NO.

Discussion

Adding the same item to a player at more than one position in the queue is not supported.

See Also

Managing the Player Queue

- items

Returns an array of the currently enqueued items.

- advanceToNextItem

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

- insertItem:afterItem:

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

- removeItem:

Removes a given player item from the queue.

- removeAllItems

Removes all player items from the queue.