Type Method


Provides the subset of metadata items whose locales match one of the specified language identifiers.


class func metadataItems(from metadataItems: [AVMetadataItem], filteredAndSortedAccordingToPreferredLanguages preferredLanguages: [String]) -> [AVMetadataItem]



An array of AVMetadataItem objects to be filtered and sorted.


An array of NSString objects, 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 preferredLanguages class method of NSLocale.

Return Value

An array containing the AVMetadataItem objects from the metadataItems parameter that match one of the specified languages.

See Also

Filtering Arrays of Metadata Items

class func metadataItems(from: [AVMetadataItem], withKey: Any?, keySpace: AVMetadataKeySpace?) -> [AVMetadataItem]

Provides an array of metadata items that match a specified key or key space.

struct AVMetadataKeySpace

A value that defines a metadata key space.

class func metadataItems(from: [AVMetadataItem], with: Locale) -> [AVMetadataItem]

Provides an array of metadata items that match a specified locale.

struct AVMetadataIdentifier

A value that defines the metadata identifiers for different file formats.