loadMetadata(for:completionHandler:)
Loads metadata items that a track contains for the specified format.
Declaration
func loadMetadata(for format: AVMetadataFormat, completionHandler: @escaping @Sendable ([AVMetadataItem]?, (any Error)?) -> Void)func loadMetadata(for format: AVMetadataFormat) async throws -> [AVMetadataItem]Parameters
- format:
The format of the metadata items to load.
- completionHandler:
A callback that the system invokes after it finishes the loading request. It passes the completion handler the following parameters:
- metadata
The loaded metadata, or an empty array if no metadata items for the specified format exist. The value is
nilif an error occurs.- error
An error object if the request fails; otherwise, nil.