One Logo Pool Ball
NowPlaying · IOS API REFERENCE

BookContent

struct · iOS 27.0+ · SDK 27.1

struct BookContent

Content representing an audiobook or book being read aloud. Use this type for audiobooks and other spoken-word book content.

Members (18)

get · iOS 27.0+

authorName

TypeScript
get authorName(): string
Swift declaration
let authorName: String

The author of the book.

get · iOS 27.0+

isExplicit

TypeScript
get isExplicit(): (boolean) | null
Swift declaration
var isExplicit: Bool?

A Boolean value that indicates whether this content is explicit.

set · iOS 27.0+

isExplicit

TypeScript
set isExplicit(value: (boolean) | null)
Swift declaration
var isExplicit: Bool?

A Boolean value that indicates whether this content is explicit.

get · iOS 27.0+

narratorName

TypeScript
get narratorName(): (string) | null
Swift declaration
let narratorName: String?

The narrator of the audiobook, if applicable.

get · iOS 27.0+

animatedArtwork

TypeScript
get animatedArtwork(): (AnimatedArtwork) | null
Swift declaration
let animatedArtwork: AnimatedArtwork?

Animated artwork for this content.

get · iOS 27.0+

isExcludedFromSuggestions

TypeScript
get isExcludedFromSuggestions(): (boolean) | null
Swift declaration
var isExcludedFromSuggestions: Bool?

A Boolean value that indicates whether to exclude this content from media suggestions. Defaults to `false`.

set · iOS 27.0+

isExcludedFromSuggestions

TypeScript
set isExcludedFromSuggestions(value: (boolean) | null)
Swift declaration
var isExcludedFromSuggestions: Bool?

A Boolean value that indicates whether to exclude this content from media suggestions. Defaults to `false`.

init · iOS 27.0+

init

TypeScript
static initIdTitleAuthorNameNarratorNameTypeDurationArtworkAnimatedArtwork(id: string, title: string, authorName: string, narratorName: (string) | null, type: MediaType, duration: (MediaDuration) | null, artwork: Artwork, animatedArtwork?: (AnimatedArtwork) | null): BookContent
Swift declaration
init(id: String, title: String, authorName: String, narratorName: String? = nil, type: MediaType = .audio, duration: MediaDuration?, artwork: Artwork, animatedArtwork: AnimatedArtwork?)

Creates audiobook content with static and animated 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 `.audio` for spoken-word content. - duration: The total duration of the audiobook, or `nil` when unknown. - artwork: Static cover artwork. - animatedArtwork: Animated artwork for the book, or `nil` when unavailable.

init · iOS 27.0+

init

TypeScript
static initIdTitleAuthorNameNarratorNameTypeDurationArtwork(id: string, title: string, authorName: string, narratorName?: (string) | null, type?: MediaType, duration?: (MediaDuration) | null, artwork?: (Artwork) | null): BookContent
Swift declaration
init(id: String, title: String, authorName: String, narratorName: String? = nil, type: MediaType = .audio, duration: MediaDuration?, artwork: Artwork?)

Creates audiobook content. - 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 `.audio` for spoken-word content. - duration: The total duration of the audiobook, or `nil` when unknown. - artwork: Cover artwork, or `nil` when unavailable.

get · iOS 27.0+

id

TypeScript
get id(): string
Swift declaration
let id: String

The unique identifier for this content.

get · iOS 27.0+

type

TypeScript
get type(): MediaType
Swift declaration
let type: MediaType

The media type. Defaults to `.audio` for book content.

get · iOS 27.0+

genre

TypeScript
get genre(): (string) | null
Swift declaration
var genre: String?

The genre of this content.

set · iOS 27.0+

genre

TypeScript
set genre(value: (string) | null)
Swift declaration
var genre: String?

The genre of this content.

get · iOS 27.0+

title

TypeScript
get title(): string
Swift declaration
let title: String

The title of the book.

get · iOS 27.0+

artwork

TypeScript
get artwork(): (Artwork) | null
Swift declaration
let artwork: Artwork?

Artwork for this content.

get · iOS 27.0+

chapter

TypeScript
get chapter(): ({ "current": number; "total": number }) | null
Swift declaration
var chapter: (current: Int, total: Int)?

The current chapter information, if applicable.

set · iOS 27.0+

chapter

TypeScript
set chapter(value: ({ "current": number; "total": number }) | null)
Swift declaration
var chapter: (current: Int, total: Int)?

The current chapter information, if applicable.

get · iOS 27.0+

duration

TypeScript
get duration(): (MediaDuration) | null
Swift declaration
let duration: MediaDuration?

The duration of this content.

Skipped declarations

No declarations were skipped in this snapshot.

All NowPlaying types →