<!--
{
  "documentType" : "article",
  "framework" : "NowPlaying",
  "identifier" : "/documentation/NowPlaying/content-types-and-metadata",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Content types and metadata"
}
-->

# Content types and metadata

Describe the media your app is playing.

## Overview

Use content types to tell the system what kind of media your app is playing. Each content type provides metadata fields appropriate for its media category, such as the song title and artist for music, or the show name and season for TV episodes.

Return a content type from your [`content`](/documentation/NowPlaying/MediaSessionRepresentable/content) or [`content`](/documentation/NowPlaying/RemoteMediaSessionRepresentable/content) property. The framework uses this information to populate the Lock Screen, Control Center, and connected accessories.

Each content type has a small set of initializer parameters for its core metadata, plus mutable properties for additional fields like `isExplicit`, `genre`, `collectionID`, and `serviceID`. Set those properties on the content value before returning it:

```swift
var content: (any MediaContentRepresentable)? {
    guard let track = currentTrack else { return nil }
    var content = MusicContent(
        id: track.id,
        songTitle: track.title,
        artistName: track.artist,
        albumName: track.album,
        type: .audio,
        duration: .finite(track.duration),
        artwork: Artwork(id: track.artworkID) { size in
            let (data, _) = try await URLSession.shared.data(from: track.artworkURL)
            return try ArtworkRepresentation(data: data)
        }
    )
    content.isExplicit = track.isExplicit
    content.genre = track.genre
    return content
}
```

## Topics

### Presenting content

[`protocol MediaContentRepresentable`](/documentation/NowPlaying/MediaContentRepresentable)

A protocol that describes media content being played.

[`struct MusicContent`](/documentation/NowPlaying/MusicContent)

Content representing a music track or song.

[`struct PodcastContent`](/documentation/NowPlaying/PodcastContent)

Content representing a podcast episode.

[`struct MovieContent`](/documentation/NowPlaying/MovieContent)

Content representing a movie.

[`struct TVShowContent`](/documentation/NowPlaying/TVShowContent)

Content representing a TV show episode.

[`struct BookContent`](/documentation/NowPlaying/BookContent)

Content representing an audiobook or book being read aloud.

[`struct RadioContent`](/documentation/NowPlaying/RadioContent)

Content representing a radio station or live audio stream.

[`struct HomeMediaContent`](/documentation/NowPlaying/HomeMediaContent)

Content representing home media or ambient content.

[`struct GenericContent`](/documentation/NowPlaying/GenericContent)

Content representing generic or unspecified media.

### Specifying type and duration

[`enum MediaType`](/documentation/NowPlaying/MediaType)

The type of media being played.

[`enum MediaDuration`](/documentation/NowPlaying/MediaDuration)

The duration of media content.

### Displaying artwork

[`struct Artwork`](/documentation/NowPlaying/Artwork)

Artwork for a media item that can be requested at a specified size.

[`struct ArtworkRepresentation`](/documentation/NowPlaying/ArtworkRepresentation)

An artwork image representation, such as music album cover art, associated with a media item.

[`struct AnimatedArtwork`](/documentation/NowPlaying/AnimatedArtwork)

Animated artwork for the media item with video and preview support.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)