AVQueuePlayer Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 4.1 and later. |
| Declared in | AVPlayer.h |
Class Methods
queuePlayerWithItems:
Returns an instance of AVQueuePlayer initialized to play items from a given array.
Parameters
- items
An array of
AVPlayerItemobjects with which initially to populate the player’s queue.
Return Value
An instance of AVQueuePlayer initialized to play the player items in items.
Discussion
Availability
- Available in iOS 4.1 and later.
See Also
Declared In
AVPlayer.hInstance Methods
advanceToNextItem
Ends playback of the current item and initiates playback of the next item in the player’s queue.
Discussion
This method also removes the current item from the play queue.
Availability
- Available in iOS 4.1 and later.
Declared In
AVPlayer.hcanInsertItem:afterItem:
Returns a Boolean value that indicates whether a given player item can be inserted into the player’s queue.
Parameters
- item
The
AVPlayerItemobject to test.- afterItem
The item that item is to follow in the queue. Pass
nilto 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.
Availability
- Available in iOS 4.1 and later.
See Also
Declared In
AVPlayer.hinitWithItems:
Initializes an instance of AVQueuePlayer by enqueueing the player items from a given array.
Parameters
- items
An array of
AVPlayerItemobjects with which initially to populate the player’s queue.
Return Value
An instance of AVQueuePlayer initialized to play the player items in items.
Discussion
Availability
- Available in iOS 4.1 and later.
Declared In
AVPlayer.hinsertItem:afterItem:
Places given player item after a specified item in the queue.
Parameters
- item
The item to be inserted.
- afterItem
The item that the newly inserted item should follow in the queue. Pass
nilto append the item to the queue.
Discussion
Availability
- Available in iOS 4.1 and later.
See Also
Declared In
AVPlayer.hitems
Returns an array of the currently enqueued items.
Return Value
An array of the currently enqueued items
Discussion
The array contains AVPlayerItem objects
Availability
- Available in iOS 4.1 and later.
Declared In
AVPlayer.hremoveAllItems
Removes all the items from the queue.
Discussion
This has the side-effect of stopping playback by the player.
Availability
- Available in iOS 4.1 and later.
Declared In
AVPlayer.hremoveItem:
Removes a given player item from the queue.
Parameters
- item
The item to be removed.
Discussion
If item is currently playing, this has the same effect as advanceToNextItem.
Availability
- Available in iOS 4.1 and later.
Declared In
AVPlayer.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-06-30)