Show Menu
TOPICS×

Timed metadata class

When TVSDK detects a subscribed tag in the playlist/manifest, the player automatically tries to process the tag and expose it in the form of a PTTimedMetadata object.
The class provides the following elements:
Property Type Description
metadataId NSString Unique identifier of the timed metadata. This value is usually extracted from the cue/tag ID attribute. Otherwise, a unique random value is provided.
name NSString The name of the timed metadata. If the type is TAG , the value represents the cue/tag name. If the type is ID3 , it is null.
time CMTime The time position, in milliseconds, relative to the start of the main content where this timed metadata is present in the stream.
type PTTimedMetadataType The type of the timed metadata.
  • TAG - indicates that the timed metadata was created from a tag in the playlist/manifest.
  • ID3 - indicates that the timed metadata was created from an ID3 tag in the media stream.
Remember the following:
  • TVSDK automatically extracts the attributes list into key-value pairs and stores the attributes in the metadata property.
    Complex data in custom tags in the manifest, such as strings with special characters, must be in quotes. For example: >
    #EXT-CUSTOM-TAG:type=SpliceOut,ID=1,time=71819.7222,duration=30.0,url=
    "www.example.com:8090?parameter1=xyz&parameter2=abc"
    ```  >
    
    
    
  • If the extraction fails because of a custom tag format, the content property always contains the tag's raw data, which is the string after the colon. No error is thrown in this case.
Element
Description
TAG, ID3
Possible types for the timed metadata.
@property (nonatomic, assign) CMTime time
The time position, relative to the start of the main content, where this metadata was inserted in the stream.
@property (nonatomic, assign) PTTimedMetadataType type
Returns the type of the timed metadata.
@property (nonatomic, retain) NSString *metadataId
Returns the ID extracted from the cue/tag attributes. Otherwise, a unique random value is provided.
@property (nonatomic, retain) NSString *name
Returns the name of the cue, which is usually the HLS tag name.