An object containing the information for a displayed media item.


class MPContentItem : NSObject


An MPContentItem object can represent any media item—for example, a song, movie, radio station, or podcast episode. The media player displays the information stored in an MPContentItem.

Update an MPContentItem object by changing its properties during runtime or by creating a new MPContentItem object with new property values, but with the same identifier as the MPContentItem object to be changed. Use the beginUpdates() and endUpdates() methods found in MPPlayableContentManager to update several MPContentItem objects at once.


Setting a Unique Identifier

init(identifier: String)

Sets the identifier for a media item.

Retrieving Information About a Media Item

var artwork: MPMediaItemArtwork?

A single image that is associated with the media item.

var isContainer: Bool

A Boolean value that indicates whether a media item is container of other items.

var isExplicitContent: Bool

A Boolean value that indicates whether the media item contains explicit content.

var identifier: String

The unique identifier for the media item.

var isPlayable: Bool

Determines if a media item is able to be played.

var isStreamingContent: Bool

A Boolean value indicating whether the content item is streaming content.

var playbackProgress: Float

The amount of content that has been played for the media item.

var subtitle: String?

A secondary designator for the media item.

var title: String?

The public name of the media item.


Inherits From

Conforms To

See Also

External Media Player Items

class MPPlayableContentManager

A shared content manager used to control interactions between your media app and system-provided or external media player interfaces.

class MPPlayableContentManagerContext

An object representing the current state of the playable endpoint.