---
title: nowPlayingInfo
framework: intents
role: symbol
role_heading: Instance Property
path: intents/inplaymediaintentresponse/nowplayinginfo
---

# nowPlayingInfo

The now-playing information, such as title and artwork, for the media.

## Declaration

```swift
var nowPlayingInfo: [String : Any]? { get set }
```

## Discussion

Discussion In your confirm(intent:completion:) response, provide now-playing information for the media so Siri can display it to the user at the appropriate time, such as after they connect headphones to their iPhone. To create the now-playing information dictionary, use the media item property keys from the Media Player framework (see General media item property keys for the list of keys). To include artwork in the dictionary, use INImage instead of UIImage to create the image object. Media intent shortcuts don’t support UIImage objects in this dictionary. The listing below creates a now-playing information dictionary. public static func nowPlayingInfo(for episode: PodcastEpisode, in container: LibraryItemContainer, forShortcut: Bool = false) -> [String: Any] {     var nowPlayingInfo: [String: Any] = [MPMediaItemPropertyTitle: episode.title,                                          MPMediaItemPropertyMediaType: MPMediaType.podcast.rawValue,                                          MPMediaItemPropertyPodcastTitle: container.title,                                          MPMediaItemPropertyPlaybackDuration: NSNumber(value: audioFileDuration)]

if forShortcut {         nowPlayingInfo[MPMediaItemPropertyArtwork] = INImage(named: container.artworkName)     } else {         if let image = UIImage(named: container.artworkName) {             let artwork = MPMediaItemArtwork(boundsSize: CGSize(width: 60, height: 60)) { (_) -> UIImage in                 return image             }                          nowPlayingInfo[MPMediaItemPropertyArtwork] = artwork         }     }          return nowPlayingInfo }
