How can I change adTagUrl using API?

We can set adTagUrl when we construct the video player. How can I change it afterwards. Like after one video finishes playing, it rolls to another, instead of playing the same video ad tag, I want to play a different one. How can I change adTagUrl using API functions?



You can change the adTagURL after the movie starts. However it will apply only for the next movie (when using a playlist) as the adTag configuration is read only once per video (when it first loads). The following code demonstrates how to change the adTagUrl when changing media (for example when you click on another video on a playlist). The code is added in the embed code readyCallback block:

'readyCallback': function(playerId){ var kdp = document.getElementById(playerId); kdp.kBind("onChangeMedia", function(){ kdp.setKDPAttribute("doubleClick","adTagUrl",",728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]"); }); },


I find that adTagUrl can be changed during the video.