Returns an array of chapters whose locale best matches the list of preferred languages.
- iOS 6.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
An array of
NSStringobjects, each of which contains a canonicalized IETF BCP 47 language identifier. The order of the identifiers in the array reflects the preferred language order, with the most preferred language being first in the array. Typically, you pass the user’s preferred languages by retrieving this array from the
preferredclass method of
An array of
Each object in the returned array contains an
AVMetadata object representing the chapter title. The time range property of the
AVTimed object is equal to the time range of the chapter title item.
All of the available chapter metadata is included in the metadata groups, including items with the common key
AVMetadata, if such items are present. Items not carrying chapter titles are added to an existing
AVTimed object if the time range (timestamp and duration) of the metadata item and that of the metadata group overlaps. The locale of such items need not match the locale of the chapter titles.
You can use the
metadata method to further filter the metadata items in each group. You can also filter the returned items based on locale using the
Becomes callable without blocking when the data in the
available property is already loaded.