Contents

canInsert(_:after:)

Returns a Boolean value that indicates whether you can insert a player item into the player’s queue.

Declaration

nonisolated func canInsert(_ item: AVPlayerItem, after afterItem: AVPlayerItem?) -> Bool

Parameters

  • item:

    The player item to insert.

  • afterItem:

    The player item in the queue to follow. Pass nil to test if you can append the item to the queue.

Return Value

true if item can be appended to the queue, otherwise false.

Discussion

Adding the same item to a player at more than one position in the queue isn’t supported.

See Also

Managing the player queue