Creates a metadata collector to access a stream’s metadata groups matching the specified array of identifiers and classifying labels.
- iOS 9.3+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 9.2+
- watchOS 6.0+
An optional array of metadata identifiers indicating the metadata items that the output should provide.
A optional array of classifying labels indicating the metadata items that the output should provide.
An instance of
You can use the
classifying arguments to configure the metadata collector to filter its output to only the metadata items matching the specified criteria.
You use the
identifiers argument to filter the output to a particular set of metadata identifiers. For instance, if the stream’s
#EXT-X-DATERANGE tags define multiple metadata attributes, but you are only interested in the values for the
X-AD-URL attributes, you could configure the collector as follows:
classifying argument is used to filter by the
CLASS attribute. The
CLASS attribute can be used to define a set of attribute/value pairs for a particular purpose (such as describing an ad) and then mark each
#EXT-X-DATERANGE instance as having those semantics. For instance, this might be used by a third party advertising SDK to filter the output to only the metadata relevant to its needs. It could define an “Advertiser-ad”
CLASS with the following attributes:
X-ADVERTISER-AD-GUID(the unique identifier for the ad)
X-ADVERTISER-AD-AGE(the number of days in its inventory)
The SDK could require clients to pass it any player items the app creates so it could configure them to output its needed data as shown below: