Creates a metadata item intended for optional display purposes.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A metadata item with the
extended, and other property values that you want the newly created
AVMetadatainstance to share. The
A block that loads the
valueof the metadata item.
A newly created instance of
You use this method to create metadata items you intend for optional display purposes, such as those used for navigation markers presented by an
AVPlayer. When the
value of this metadata item is requested, the block you provide as the value loading handler will be executed on an arbitrary dispatch queue, off the main thread. The handler can perform I/O and other necessary operations to obtain the value. If loading of the value succeeds, you provide the value by invoking the value request’s
respond method; otherwise, you provide an instance of
NSError that describes the failure by calling its
respond method (see example).