init(id:title:subtitle:type:duration:artwork:)
Creates generic media content.
Declaration
init(id: String, title: String, subtitle: String? = nil, type: MediaType, duration: MediaDuration?, artwork: Artwork?)Parameters
- id:
A unique identifier for this content.
- title:
The primary display title.
- subtitle:
Secondary information to display below the title.
- type:
The media type.
- duration:
The total duration, or
nilwhen unknown. - artwork:
Artwork for the content, or
nilwhen unavailable.
Discussion
Use this initializer when your media doesn’t fit other content types.