Override a VAST Ad Set for a V3 HTML5 Player with vastAds

With the Player V3 vastAds parameter you can programmatically override any VAST ads or ad sets applied in Backlot. This feature allows you to add VAST ads to an asset as pre-roll, post-roll, and mid-roll ads from the player embedded parameters. If ads are set with vastAds, ads and ad sets associated with the asset in Backlot will be ignored.

Note: This feature is only available for HTML5.

To use Ooyala's VAST adset ad integrations, log into the Customer Portal and submit a ticket requesting that this ad source be added to your account. After you have this feature enabled, you can associate VAST ad tags with your video.

Use vastAds with the Ooyala Player

To override a VAST ad set with vastAds, use the Player V3 OO.Player.create function. See Assigning an Ad Set with OO.Player.create for instructions on how to use OO.Player.create.

This JavaScript function takes the vastAds embedded parameter and key value pairs representing the ad type, link to the VAST ad video, how often the video should be called, how many videos should play before the VAST ad, and the time during the video asset when the ad should play.

The fields for vastAds are explained in detail in VAST Ads Embedded Parameters. The following example illustrates the use of the vastAds parameter.

var player = OO.Player.create('playerwrapper', embedCode, {
  'vastAds': [{
    type:  "vast",
    url:  "http://pubads.g.doubleclick.net/gampad/ads?sz=640x360&iu=/6062/iab_vast_samples/skippable&ciu_szs=300x250,728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]" ,
    frequency: 1,
    first_shown: 0,
    time: 0
  },
  {
    type:  "vast",
    url:  "http://pubads.g.doubleclick.net/gampad/ads?sz=640x360&iu=/6062/iab_vast_samples/skippable&ciu_szs=300x250,728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]" ,
    frequency: 1,
    first_shown: 0,
    time: 10000
  }]
});

해당 내용이 도움 되었습니까?