...
If you do not want to load the script as a high-priority, there is an event that you can listen to at the global-changes level to ensure that the context methods are available. An example of setting up that event listener:
...
Call
getRecommendationsInfo
route as a part of callbacks for IRIS.TV /watch and /next API routes, which are exposed through the irisResponseReady event.You only need to create this event along with the getRecommendationsInfo route once
You need to send the e.detail.platform_id value as it is shown below
Store data returned from
getRecommendationsInfo
so it can be used to retrieve data each recommended video.On video load, query player for ID of the video and then query stored platform_id values for context or IAB categories.
Send context of IAB category data in the pre-roll ad call for the video.
...