Contents

metadata(forFormat:)

Returns metadata items that a track contains for the specified format.

Declaration

func metadata(forFormat format: AVMetadataFormat) -> [AVMetadataItem]

Parameters

  • format:

    The format of the metadata items to retrieve.

Return Value

An array of metadata items matching the specified format, or an empty array if none are found.

Discussion

Apple discourages the use of this method in iOS 15, tvOS 15, and macOS 12 or later. Load track metadata asynchronously using loadMetadata(for:completionHandler:) instead.

You can call this method without blocking the current thread after you’ve loaded the availableMetadataFormats property.