---
title: INPlayMediaIntent
framework: intents
role: symbol
role_heading: Class
path: intents/inplaymediaintent
---

# INPlayMediaIntent

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

## Declaration

```swift
class INPlayMediaIntent
```

## Mentioned in

Improving Siri Media Interactions and App Selection Creating an Intents App Extension

## Overview

Overview Use INPlayMediaIntent to donate songs, movies, and other media the user plays in your app, or to recommend upcoming media, such as new TV shows or podcast episodes. The system uses these donations to offer the user relevant search results and suggestions. INPlayMediaIntent supports playing audio in the background. See Enabling Background Audio for more information about supporting background audio in your app. Additional Intent Attributes The following table lists additional attributes of this intent object:  |   |   |

## Topics

### Creating a Play Media Intent

- [init(mediaItems:mediaContainer:playShuffled:playbackRepeatMode:resumePlayback:playbackQueueLocation:playbackSpeed:mediaSearch:)](intents/inplaymediaintent/init(mediaitems:mediacontainer:playshuffled:playbackrepeatmode:resumeplayback:playbackqueuelocation:playbackspeed:mediasearch:).md)

### Accessing Media Items

- [mediaContainer](intents/inplaymediaintent/mediacontainer.md)
- [mediaItems](intents/inplaymediaintent/mediaitems.md)

### Accessing Playback Settings

- [playShuffled](intents/inplaymediaintent/playshuffled-2btex.md)
- [resumePlayback](intents/inplaymediaintent/resumeplayback-1xw6r.md)
- [playbackRepeatMode](intents/inplaymediaintent/playbackrepeatmode.md)
- [INPlaybackRepeatMode](intents/inplaybackrepeatmode.md)
- [playbackSpeed](intents/inplaymediaintent/playbackspeed-17r2t.md)
- [playbackQueueLocation](intents/inplaymediaintent/playbackqueuelocation.md)
- [INPlaybackQueueLocation](intents/inplaybackqueuelocation.md)
- [mediaSearch](intents/inplaymediaintent/mediasearch.md)

## Relationships

### Inherits From

- [INIntent](intents/inintent.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [INIntentSetImageKeyPath](intents/inintentsetimagekeypath.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Playable Media Intents

- [INPlayMediaIntentHandling](intents/inplaymediaintenthandling.md)
- [INPlayMediaIntentResponse](intents/inplaymediaintentresponse.md)
