Class

MusicKit.MediaItem

This class represents a single media item.

Declaration

interface MusicKit.MediaItem

Topics

Initializers

MusicKit.MediaItem

A constructor that creates a new media item from specified options.

Instance Properties

albumInfo

A string of information about the album.

albumName

The title of the album.

artistName

The artist for a media item.

artwork

The artwork object for the media item.

artworkURL

The artwork image for the media item.

attributes

The attributes object for the media item.

contentRating

A string containing the content rating for the media item.

discNumber

The disc number where the media item appears.

id

The identifier for the media item.

info

A string of common information about the media item.

isExplicitItem

A Boolean value that indicates whether the item has explicit lyrics or language.

isPlayable

A Boolean value that indicated whether the item is playable.

isPreparedToPlay

A Boolean value indicating whether the media item is prepared to play.

isrc

The ISRC (International Standard Recording Code) for a media item.

playbackDuration

The playback duration of the media item.

previewURL

The URL to an unencrypted preview of the media item.

releaseDate

The release date of the media item.

title

The name of the media item.

trackNumber

The number of the media item in the album's track list.

type

The type of the media item.

Instance Methods

prepareToPlay

Prepares a media item for playback.

See Also

Media Items

MusicKit.MediaItemOptions

The options to use when defining a media item.

descriptor

This property describes a media item.