Radiant Media Player

Ad waterfalling

Last updated on March 27, 2017.

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

Radiant Media Player supports two client-side modes for ad waterfalling:

  • Waterfalling based on adTagWaterfall player setting: adTags for waterfalling are passed to the player as a configuration option
  • VAST-embedded waterfalling: waterfalling information are included in the VAST response and the player will automatically pick them up when needed

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 -->
// 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: [
  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!

VAST-embedded waterfalling

In this case waterfalling information are located within the VAST XML response (VAST Wrapper with attribute fallbackOnNoAd="true"). See this tag for an example.

When no VAST response after one or more Wrappers (also includes number of empty VAST responses from fallback) 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.