init(id:songTitle:artistName:albumName:type:duration:artwork:animatedArtwork:)
Creates music content with static and animated artwork.
Declaration
init(id: String, songTitle: String, artistName: String, albumName: String, type: MediaType, duration: MediaDuration?, artwork: Artwork, animatedArtwork: AnimatedArtwork?)Parameters
- id:
A unique identifier for this track.
- songTitle:
The song’s display title.
- artistName:
The name of the artist or performer.
- albumName:
The album this track belongs to.
- type:
The media type.
- duration:
The total duration of the track, or
nilwhen unknown. - artwork:
Static artwork for the track.
- animatedArtwork:
Animated artwork for the track, or
nilwhen unavailable.
Discussion
Use this initializer when your track has a matching animated asset, for example motion album art.