init(id:title:authorName:narratorName:type:duration:artwork:)
Creates audiobook content.
Declaration
init(id: String, title: String, authorName: String, narratorName: String? = nil, type: MediaType = .audio, duration: MediaDuration?, artwork: Artwork?)Parameters
- id:
A unique identifier for this book.
- title:
The book’s display title.
- authorName:
The name of the book’s author.
- narratorName:
The name of the audiobook narrator, if available.
- type:
The media type. Defaults to
.audiofor spoken-word content. - duration:
The total duration of the audiobook, or
nilwhen unknown. - artwork:
Cover artwork, or
nilwhen unavailable.