Radiant Media Player

Ad waterfalling



Last updated on May 6, 2017.


Supported ad waterfalling modes (a.k.a. fallback or mediation)

Radiant Media Player supports two modes for ad waterfalling:

  • Waterfalling based on adTagWaterfall player setting: adTags for waterfalling are passed to the player as a configuration option. The player will run through all available adTags until it finds a VAST response including an ad or has no more adTags to waterfall upon.
  • VAST-embedded waterfalling: known as VAST redirects (VAST Wrapper) and described in the VAST 3 specification. The player will follow any redirect information it finds in a VAST response until it locates an ad or has no more redirect information to follow. This includes supporting the fallbackOnNoAd, allowMultipleAds, followAdditonalWrappers attributes for VAST Wrappers.

Why do you need waterfalling?

It is all about fill-rate. At a given point in time an ad-server may or may not have inventory to return a VAST response including an ad. Your ad-server may have specific agreements to provide VAST redirect information to maximise fill-rate but event with that it is not guaranteed that a VAST response including an ad is actually being returned. On top of that one must account for potential network errors as the VAST process generally requires several HTTP requests to properly complete.

As such you can use the player adTagWaterfall setting to maximise fill-rate and thus revenue. Using this setting generally implies using different ad-servers to waterfall between one another.


Waterfalling based on player setting

adTagWaterfall: Array

Specifies an array of backup adTagUrls if the first adTagUrl produces an error or if no ads are available at the time of request (auction based ads). The player will cycle through all available adTag (in order) in adTagWaterfall until one is available or will resume content if none are available. Default: [].

If you use DoubleClick for Publishers refer to this article for more information on ad waterfall. This is the preferred way to implement ad waterfall for DFP VAST redirect creative types.

Player code example:

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/v4/latest/js/rmp.min.js"></script>
<!-- Set up your wrapper div with its unique id -->
<div id="rmpPlayer"></div>
<!-- Set up player configuration options -->
<script>
// First we specify bitrates to feed to the player
var bitrates = {
  hls: 'https://dqwp3xzzbfhtw.cloudfront.net/vod/smil:bbb.smil/playlist.m3u8'
};
// Then we set our player settings
var settings = {
  licenseKey: 'your-license-key',
  bitrates: bitrates,  
  delayToFade: 3000,
  width: 640,
  height: 360,
  ads: true,
  adTagUrl: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=',
  // Here comes our waterfall array with fallback adTag urls  
  adTagWaterfall: [
    'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=',
    'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator='
  ],  
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg'
};
// Reference to the wrapper div (unique id)
var elementID = 'rmpPlayer';
// Create an object based on RadiantMP constructor
var rmp = new RadiantMP(elementID);
// Initialization ... test your page and done!
rmp.init(settings);
</script>

VAST-embedded waterfalling

The player will automatically follow any VAST redirect information (VAST Wrapper) until it finds a suitable VAST response or has no more redirect to follow.

When no valid VAST response after one or more Wrappers is available the player will fire an aderror event. The getAdVastErrorCode method shall provide the error code 303 specific to this case scenario. See VAST 3 video error codes.

The player will always look for VAST-embedded waterfall before using data in the adTagWaterfall setting when both waterfalling options are available.


Implementing your own waterfalling solution with our video ads API

While the default options provided by Radiant Media Player should cover most basic waterfalling needs you may want to build something more advanced to better fit your use case. This can be done through our ads API.

In this case you would not be using the adTagWaterfall setting but you would rather listen to various API events and use the loadAds API method to request new ads when needed. Complete documentation for our ads API can be found here.

To help you get started we are providing an example of custom waterfalling implementation that we have often seen requested by our customers. In this example we provide the player with an array of VAST tags to waterfall upon and we set the target of displaying 3 prerolls in a row before the content can begin. For each preroll request the player will run through the waterfall array to maximize the chance of an ad load success.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.