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 TimedMetadata object.
The class provides the following elements:
Property | Type | Description |
---|---|---|
content | String | The raw content of the timed metadata. If the type is TAG, the value represents the entire attribute list of the cue/tag. If the type id ID3, it is null. |
id | String | Unique identifier of the timed metadata. This value is usually extracted from the cue/tag ID attribute. Otherwise, a unique random value is provided. |
metadata | Metadata | The processed/extracted information from the playlist/manifest custom tag. |
name | String | 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 | Number | The time position, in milliseconds, relative to the start of the main content where this timed metadata is present in the stream. |
type | String | The type of the timed metadata.
|
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¶meter2=abc"
If the extraction fails because of a custom tag format, the metadata property will be empty and your application must extract the actual information. No error is thrown in this case.
Element | Description |
---|---|
TAG, ID3 ID3, TAG |
Possible types for the timed metadata. |
public function TimedMetadata(type:String, time:Number, id:String, name:String, content:String, metadata:Metadata) |
Default constructor (time is the local stream time). |
content:String |
The raw content of the source tag of this timed metadata. |
time:Number |
The time position, relative to the start of the main content, where this metadata was inserted in the stream. |
metadata:Metadata |
The metadata inserted in the stream. |
type:String |
Returns the type of the timed metadata. |
id:String |
Returns the ID extracted from the cue/tag attributes. Otherwise, a unique random value is provided. |
name:String |
Returns the name of the cue, which is usually the HLS tag name. |