Protocol

MPPlayableContentDelegate

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

Declaration

@protocol MPPlayableContentDelegate

Overview

After the media player determines that a media item is to be played, the app’s content delegate requests for playback to be initiated.

When creating your CarPlay app, keep the following in mind:

  • Transition to the Now Playing screen only when content is ready to play. Due to buffering and network conditions, it may take several seconds for audio to begin playing after a user selects it. The user’s selection remains highlighted, and a spinning activity indicator is displayed until your app informs the system that the audio is ready to play.

  • Start playback as soon as possible. Playback should begin as soon as audio has sufficiently loaded, even if descriptive information is still loading. Continue loading descriptive information in the background and show it once available.

  • Avoid beginning playback automatically. Unless your app’s purpose is to play a single source of audio, it shouldn’t begin playback until the user initiates it.

Topics

Playing a Specific Media Item

- playableContentManager:initiatePlaybackOfContentItemAtIndexPath:completionHandler:

Asks the delegate to begin playback of the specified content item.

Suggesting Content for Playback

- playableContentManager:initializePlaybackQueueWithContentItems:completionHandler:

Asks the delegate to prepare suggested content for playback.

Deprecated
- playableContentManager:initializePlaybackQueueWithCompletionHandler:

Asks the delegate to prepare suggested content for playback.

Deprecated

Responding to Context Changes

- playableContentManager:didUpdateContext:

Notifies the delegate that the playable content manager’s context information has changed.

Relationships

Inherits From

See Also

Responding to Playback Events

delegate

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