Media

Listen and control audio through Siri Intents or listen and watch media content from your app with shortcuts.

Overview

With the Media domain, users can play and control audio media in your app. Your Intents app extension directs any media-related requests to your app, which then handles the request.

Siri can suggest shortcuts to audio available in your app when the user wants to listen to the content. For example, Siri may suggest a playlist to the user after they connect headphones to their iPhone. These suggestions give the user a convenient way to play the media in your app.

In order for Siri to suggest media content, you should donate an INPlayMediaIntent object to Siri after the user plays the content (see Donating Shortcuts). To have Siri suggest new media that might be of interest to the user, save INPlayMediaIntent shortcuts for the new content to the INUpcomingMediaManager.

Topics

Playable Media Intents

Playing Media Through Siri Shortcuts

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

INPlayMediaIntentHandling

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

INPlayMediaIntent

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

INPlayMediaIntentResponse

Your response to a play media intent.

Add Media

INAddMediaIntentHandling

The handler interface that adds media.

Beta
INAddMediaIntent

A request to add a media item.

Beta
INAddMediaIntentResponse

Your app’s response to an add media intent.

Beta

Search for Media

INSearchForMediaIntentHandling

The interface that handles media search requests.

Beta
INSearchForMediaIntent

A request to search for a media item.

Beta
INSearchForMediaIntentResponse

Your app’s response to a search media intent.

Beta

Update Media Affinity

INUpdateMediaAffinityIntentHandling

The interface that handles requests to update the user’s preference for a media item.

Beta
INUpdateMediaAffinityIntent

A request to update the user’s affinity for a media item.

Beta
INUpdateMediaAffinityIntentResponse

Your app’s response to an update media affinity intent.

Beta

User Context

INUserContext

An object that provides user information to Siri.

Beta
INMediaUserContext

An object that provides user information to Siri.

Beta

Data Objects

INMediaItem

An object that describes a piece of media content, such as a song, TV show, artist, or podcast playlist.

INMediaSearch

An object that describes a media type to search for, such as a station name, song name, or album name.

Beta

Upcoming Media

INUpcomingMediaManager

The manager object you use to suggest media to the user.

Resolution Results

INAddMediaMediaDestinationResolutionResult

A resolution result for the types of destinations when adding media.

Beta
INAddMediaMediaItemResolutionResult

A resolution result for the media item to add.

Beta
INMediaDestinationResolutionResult

A resolution result for the media destination types.

Beta
INMediaItemResolutionResult

A resolution result for media item types.

INMediaAffinityTypeResolutionResult

A resolution result for the user’s affinity for a media item.

Beta
INPlayMediaMediaItemResolutionResult

A resolution result for the media item to play.

Beta
INPlayMediaPlaybackSpeedResolutionResult

A resolution result that determines the playback speed of a media item.

Beta
INPlaybackRepeatModeResolutionResult

A resolution result for the playback repeat modes of a media item.

INPlaybackQueueLocationResolutionResult

A resolution result for the requested playback queue location.

Beta
INSearchForMediaMediaItemResolutionResult

A resolution result for the media item for which to search.

Beta
INUpdateMediaAffinityMediaItemResolutionResult

A resolution result for updating the user’s affinity for a media item.

Beta

See Also

Siri Domains

Messaging

Send messages and search the user’s received messages.

Lists and Notes

Create and manage notes and to-do list items.

Workouts

Start, end, and manage fitness routines.

Payments

Send payments between users or pay bills.

VoIP Calling

Initiate calls and search the user’s call history.

Visual Codes

Convey contact and payment information using Quick Response (QR) codes.

Photos

Search for and display photos.

Ride Booking

Book rides and report their status.

Car Commands

Manage vehicle door locks and get the vehicle’s status.

CarPlay

Interact with a vehicle’s CarPlay system.

Restaurant Reservations

Create and manage restaurant reservations with help from the Maps app.

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