Async AdTag with async cloud players

Demonstrates the use of globally defined adTags in async cloud players.

Sample implementation

Requirements

HTML code

  <div data-player-id="a40cfb3f-49ee-4969-bce6-336c70096aa4"><script src="//cdn.flowplayer.com/players/48144689-f482-42bb-83fb-b30fb199abc2/native/flowplayer.async.js">{"src": "3ca57be7-6628-45e3-9f23-bba96493ac05"}</script></div>

Javascript

// use `my_ad_tag_fetcher` as the function name in the code and the OVP adTag configuration
window.my_ad_tag_fetcher = function() {
  return new Promise(resolve => {
    // we use an IMA3 sample tag here, you would use your own
    const ad_tag_url = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator="
    resolve(ad_tag_url)
  })
};

Replace the player script and id with your own, the example only works on flowplayer.com.

Standalone demo

global adTag with async cloud players

Results