Class

MPMusicPlayerMediaItemQueueDescriptor

A set of properties and methods used to modify audio media items in the player's media queue.

Declaration

class MPMusicPlayerMediaItemQueueDescriptor : MPMusicPlayerQueueDescriptor

Overview

Use this class to modify the player queue created by a query before the queue begins to play. You can modify when individual items start and stop playing, along with setting the first item to be played.

Topics

Creating a New Media Item Queue Descriptor

init(itemCollection: MPMediaItemCollection)

Creates a new queue descriptor using the designated collection.

init(query: MPMediaQuery)

Creates a new queue descriptor using the designated query.

Media Item Queue Descriptor Properties

var itemCollection: MPMediaItemCollection

Contains the media item collection used to create the queue descriptor.

var query: MPMediaQuery

Contains the media items found by the query used to create the queue descriptor.

var startItem: MPMediaItem?

Designates the media item that will be played first.

Setting Start and End Times

func setStartTime(TimeInterval, for: MPMediaItem)

The time the designated media item is to start playing.

func setEndTime(TimeInterval, for: MPMediaItem)

The time the designated media item is to stop playing.

Relationships

Conforms To

See Also

Media Player Queues

class MPMusicPlayerControllerQueue

An immutable queue containing the media items to be played by an application queue media player.

class MPMusicPlayerControllerMutableQueue

A mutable queue containing the media items to be played by the media player.

class MPMusicPlayerApplicationController

A media player object that you use to revise the queue that is currently playing.

class MPMusicPlayerStoreQueueDescriptor

A set of properties and methods used to modify items, based on their store identifier, in the player's queue.

class MPMusicPlayerPlayParametersQueueDescriptor

A set of properties and methods used to modify how items are played, based on play parameters returned from MusicKit API results.

class MPMusicPlayerQueueDescriptor

The abstract base class for audio media item and store queue descriptors.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software