Browser TVSDK prepares TimedMetadata objects for subscribed tags each time these objects are encountered in the Media Presentation Description (MPD) file.
You must subscribe to the tags before playback starts.
To subscribe to tags, set a vector that contains the custom tag names to the subscribedTags
property. If you also need to change the ad tags used by the default opportunity generator, set a vector that contains the custom ad tag names to the adTags
property.
To subscribe to custom tags:
Create a new media player item configuration.
var mediaPlayerItemConfig = new AdobePSDK.MediPlayerItemConfig();
Create an empty string-vector.
var subscribeTags = [];
Add the custom tag names to this vector.
If you are dealing with HLS streams, remember to include the #
prefix.
subscribeTags.push("urn:mpeg:dash:event:2012");
subscribeTags.push("urn:com:adobe:dpi:simple:2015");
Assign the updated vector to the mediaPlayerItemConfig.subscribeTags
property.
mediaPlayerItemConfig.subscribeTags = subscribeTags;
Create an empty string-vector.
var adTags= [];
Add the custom ad tag name to this vector.
adTags.push("urn:com:adobe:dpi:simple:2015");
Assign the updated vector to the mediaPlayerItemConfig.adTags
property.
mediaPlayerItemConfig.adTags = adTags;
Use the media player item configuration when loading the media stream.
player.replaceCurrentResource(mediaResource,mediaPlayerItemConfig);