Class

MPPlayableContentManager

A shared content manager used to control interactions between your media app and system-provided or external media player interfaces.

Declaration

@interface MPPlayableContentManager : NSObject

Overview

The app provides data to the content manager so that the media player can browse the content provided. A delegate provides the media player the ability to perform actions that manage the app’s playback queue.

You don’t create a new content manager directly, instead you grab the shared content manager using the sharedContentManager method. After getting the shared content manager, your next step depends on the features your app supports:

  • To provide content navigation and suggested content for CarPlay, immediately set both the dataSource and delegate properties. After setting these properties, use the beginUpdates and endUpdates methods to load the information from the data source.

  • To provide suggested content when the user connects headphones, a Bluetooth stereo, or another output device, set only the delegate property. After you set a delegate, iOS automatically calls methods in the MPPlayableContentDelegate protocol allowing you to suggest appropriate content.

Topics

Providing Playable Content

dataSource

The data source provided by the app.

MPPlayableContentDataSource

The data source providing media metadata to external media players so they can build user interfaces displaying your app’s content.

Responding to Playback Events

delegate

A delegate that lets the media player manage the app’s playback queue.

MPPlayableContentDelegate

The protocol used to let external media players send playback commands to an app.

Setting the Content Manager

+ sharedContentManager

Returns the current content manager instance.

Updating Data

- beginUpdates

Updates several Media Player content items at once.

- endUpdates

Ends a synchronized update.

- reloadData

Reloads the data from the data source.

Retrieving Information on Currently Playing Items

context

The current state of the playable content endpoint.

nowPlayingIdentifiers

The content items currently playing based on their identifiers.

Relationships

Inherits From

See Also

External Media Player Items

MPContentItem

An object containing the information for a displayed media item.

MPPlayableContentManagerContext

An object representing the current state of the playable endpoint.