Protocol

INPlayMediaIntentHandling

The interface an object implements to confirm and handle play media intents.

Declaration

@protocol INPlayMediaIntentHandling

Overview

Use the methods of the INPlayMediaIntentHandling protocol to confirm and handle requests for media playback in your app. Adopt this protocol in an object of your Intents app extension capable of verifying that the media is playable in your app. When handling the playback request, send the request to your app and let your app perform the playback, rather than playing the media in the extension. The lifespan of extensions is too short for media playback.

Siri delivers an INPlayMediaIntent object to your handler when the user invokes the media intent shortcut. This intent object contains metadata that identifies the requested media content.

Topics

Resolving the Intent Parameters

- resolveMediaItemsForPlayMedia:withCompletion:

Resolves the media items to play.

- resolvePlayShuffledForPlayMedia:withCompletion:

Resolves whether to shuffle the played media.

- resolvePlaybackQueueLocationForPlayMedia:withCompletion:

Resolves the location in the playback queue where your app plays the media.

- resolvePlaybackRepeatModeForPlayMedia:withCompletion:

Resolves the repeat mode when playing media.

- resolvePlaybackSpeedForPlayMedia:withCompletion:

Resolves the playback speed when playing media.

- resolveResumePlaybackForPlayMedia:withCompletion:

Resolves whether to resume playback.

Confirming the Response

- confirmPlayMedia:completion:

Confirms the details of the media playback request.

Handling the Intent

- handlePlayMedia:completion:

Handles the media playback request.

Required.

Relationships

Inherits From

See Also

Playable Media Intents

Playing Media Through Siri Shortcuts

Play audio and video from your app using media intent shortcuts.

INPlayMediaIntent

An intent that contains information about media playable from your app.

INPlayMediaIntentResponse

Your response to a play media intent.