AVInterfaceMetadataTemplate
A mutable template for configuring media metadata before creating immutable metadata objects.
Declaration
@interface AVInterfaceMetadataTemplate : NSObjectOverview
Use this class to build and configure metadata for media content with full control over all properties. Once configured, create an immutable AVInterfaceMetadata object using initWithTemplate: to provide stable metadata for playback interfaces.
This template provides a convenient way to incrementally build metadata information, allowing you to set properties individually before finalizing the metadata. All properties are mutable (readwrite), making it ideal for scenarios where metadata is constructed from multiple sources or updated over time.
Example usage:
AVInterfaceMetadataTemplate *template = [[AVInterfaceMetadataTemplate alloc] init]; template.audioOnly = NO; template.title = @“Episode 5: The Journey Continues”; template.subtitle = @“Season 2”; template.albumArtworkRepresentations = @[artwork1, artwork2];
AVInterfaceMetadata *metadata = [[AVInterfaceMetadata alloc] initWithTemplate:template];