One Logo Pool Ball
MusicKit · IOS API REFERENCE

MusicVideo

struct · iOS 15.0+ · SDK 27.1

struct MusicVideo

A music item that represents a music video.

Members (33)

get · iOS 15.0+

albumTitle

TypeScript
get albumTitle(): (string) | null
Swift declaration
var albumTitle: String? { get }

The title of the album the music video appears on.

get · iOS 15.0+

artistName

TypeScript
get artistName(): string
Swift declaration
var artistName: String { get }

The artist’s name.

get · iOS 15.0+

genreNames

TypeScript
get genreNames(): Array<string>
Swift declaration
var genreNames: [String] { get }

The names of the music video’s associated genres.

get · iOS 15.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 15.0+

moreInGenre

TypeScript
get moreInGenre(): (MusicItemCollection<MusicVideo>) | null
Swift declaration
var moreInGenre: MusicItemCollection<MusicVideo>? { get }

A collection of music videos in the same genre as this music video.

get · iOS 15.0+

releaseDate

TypeScript
get releaseDate(): (globalThis.Date) | null
Swift declaration
var releaseDate: Date? { get }

The release date (or expected prerelease date) for the music video.

get · iOS 15.0+

trackNumber

TypeScript
get trackNumber(): (number) | null
Swift declaration
var trackNumber: Int? { get }

The music video’s number in the album’s track list.

get · iOS 15.0+

moreByArtist

TypeScript
get moreByArtist(): (MusicItemCollection<MusicVideo>) | null
Swift declaration
var moreByArtist: MusicItemCollection<MusicVideo>? { get }

A collection of additional music videos by the artist.

get · iOS 15.0+

contentRating

TypeScript
get contentRating(): (ContentRating) | null
Swift declaration
var contentRating: ContentRating? { get }

The rating of the content. A nil value means no rating is available for this music video.

get · iOS 15.0+

previewAssets

TypeScript
get previewAssets(): (Array<PreviewAsset>) | null
Swift declaration
var previewAssets: [PreviewAsset]? { get }

The preview assets for the music video.

get · iOS 15.0+

editorialNotes

TypeScript
get editorialNotes(): (EditorialNotes) | null
Swift declaration
var editorialNotes: EditorialNotes? { get }

The editorial notes for the music video.

get · iOS 16.0+

lastPlayedDate

TypeScript
get lastPlayedDate(): (globalThis.Date) | null
Swift declaration
var lastPlayedDate: Date? { get }

The date when the user last played the music video on this device.

get · iOS 15.0+

playParameters

TypeScript
get playParameters(): (PlayParameters) | null
Swift declaration
var playParameters: PlayParameters? { get }

The parameters to use to play the music video.

get · iOS 15.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 16.0+

libraryAddedDate

TypeScript
get libraryAddedDate(): (globalThis.Date) | null
Swift declaration
var libraryAddedDate: Date? { get }

The date when the user added the music video to the library.

get · iOS 15.0+

id

TypeScript
get id(): MusicItemID
Swift declaration
let id: MusicItemID

The unique identifier for the music video.

get · iOS 15.0+

url

TypeScript
get url(): (string) | null
Swift declaration
var url: URL? { get }

The URL for the music video.

get · iOS 15.0+

isrc

TypeScript
get isrc(): (string) | null
Swift declaration
var isrc: String? { get }

The International Standard Recording Code (ISRC) for the music video.

get · iOS 15.0+

has4K

TypeScript
get has4K(): (boolean) | null
Swift declaration
var has4K: Bool? { get }

A Boolean value that indicates whether the music video has 4K content.

get · iOS 15.0+

songs

TypeScript
get songs(): (MusicItemCollection<Song>) | null
Swift declaration
var songs: MusicItemCollection<Song>? { get }

The music video’s associated songs.

get · iOS 15.0+

title

TypeScript
get title(): string
Swift declaration
var title: String { get }

The title of the music video.

get · iOS 15.0+

albums

TypeScript
get albums(): (MusicItemCollection<Album>) | null
Swift declaration
var albums: MusicItemCollection<Album>? { get }

The music video’s associated albums.

get · iOS 15.0+

genres

TypeScript
get genres(): (MusicItemCollection<Genre>) | null
Swift declaration
var genres: MusicItemCollection<Genre>? { get }

The music video’s associated genres.

get · iOS 15.0+

hasHDR

TypeScript
get hasHDR(): (boolean) | null
Swift declaration
var hasHDR: Bool? { get }

A Boolean value that indicates whether the music video has HDR10-encoded content.

get · iOS 15.0+

artists

TypeScript
get artists(): (MusicItemCollection<Artist>) | null
Swift declaration
var artists: MusicItemCollection<Artist>? { get }

The music video’s associated artists.

get · iOS 15.0+

artwork

TypeScript
get artwork(): (Artwork) | null
Swift declaration
var artwork: Artwork? { get }

The artwork for the music video.

get · iOS 26.4+

endTime

TypeScript
get endTime(): (number) | null
Swift declaration
var endTime: TimeInterval? { get }

The custom end time for the music video.

get · iOS 15.0+

duration

TypeScript
get duration(): (number) | null
Swift declaration
var duration: TimeInterval? { get }

The duration of the music video.

get · iOS 15.0+

workName

TypeScript
get workName(): (string) | null
Swift declaration
var workName: String? { get }

For classical music only, the name of the associated work.

get · iOS 15.0+

artistURL

TypeScript
get artistURL(): (string) | null
Swift declaration
var artistURL: URL? { get }

The artist’s URL.

get · iOS 15.0+

isPreview

TypeScript
get isPreview(): boolean
Swift declaration
var isPreview: Bool { get }

A Boolean value that indicates whether this content corresponds to a subscription video preview.

get · iOS 16.0+

playCount

TypeScript
get playCount(): (number) | null
Swift declaration
var playCount: Int? { get }

The number of times the user played the music video.

get · iOS 26.4+

startTime

TypeScript
get startTime(): (number) | null
Swift declaration
var startTime: TimeInterval? { get }

The custom start time for the music video.

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →