Radiant Media Player

Ad skipping



Documentation sections


Ad skipping scope of support

Offering ad skipping options to your audience is great way to monetise your content while providing a gentle and smart viewing experience. Radiant Media Player supports ad skipping in 2 ways:

  • VAST 3 skippable video ads: when a valid VAST 3 tag with skippable information (e.g. skip information are held within the VAST XML response) is presented to the player, it will automatically read that information and display a skip button when appropriate. This is available for the Google IMA and our rmp-vast VAST parser - no extra configuration is required.
  • Ad skipping through player settings: in this case skip information are not held within the VAST XML response but are passed to the player through player settings.

Ad skipping through player settings

Using VAST 3 skippable video ads (e.g. skip information held in the VAST XML response) is the preferred way to support ad skipping with Radiant Media Player. As an alternative we support configurable ad skipping through player settings with rmp-vast.

Configurable ad skipping through player settings is not available for the Google IMA SDK as it would go against Google terms of service. VAST skippable ads must be configured with the ad-server when using the Google IMA SDK.

When both adSkipButton is set to true and a VAST skippable ad is detected, only one skip button will show and the VAST skippable data will take precedence.

adSkipButton: Boolean

When set to true this setting will enable the display of a skip button while a linear video ad is on stage. Default: false.

adSkipOffset: Number

Sets the time in seconds before the linear ad becomes effectively skippable. In-between the player will show a message and countdown announcing the soon-to-be available skip option. Default: 5.

It is also possible to customise the skip message and waiting for skip message through player labels.

Player code for the above example - see this example here

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/5.6.0/js/rmp.min.js"></script>
<!-- Player container element -->
<div id="rmpPlayer"></div>
<script>
  // Streaming source - MP4 progressive download in this example
  var src = {
    mp4: [
      'https://your-mp4-url.mp4'
    ]
  };
  // Player labels to customise ad skipping messages
  var labels = {
    ads: {
      controlBarCustomMessage: 'RMP ad',
      skipMessage: 'Skip this ad',
      skipWaitingMessage: 'Skip this ad in'
    }
  };
  // Player settings
  var settings = {
    licenseKey: 'your-license-key',
    src: src,
    width: 640,
    height: 360,
    ads: true,
    adTagUrl: 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml',
    contentMetadata: {
      poster: [
        'https://your-poster-url.jpg'
      ]
    },
    // Here we pass the ad skipping settings
    adSkipButton: true,
    adSkipOffset: 4,
    adParser: 'rmp-vast',
    labels: labels
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  rmp.init(settings);
</script>

Ad skipping through player API

The following methods are available for skippable ads. Note that those methods only work with VAST 3+ skippable ads or when the adSkipButton setting is used.

If you want to "skip" an ad that is not a VAST 3+ skippable ad or while not using the adSkipButton setting, you must use the stopAds API method which is available for both Google IMA and rmp-vast.

skipAd()
rmp.skipAd();

This method orders the player to skip the currently displayed ad (and to resume content). This method only has effects if the ad is a skippable ad and is in a state where it can be skipped. Once may query the getAdSkippableState API method to know if an ad can be skipped or not.

getAdSkippableState()
rmp.getAdSkippableState();

This method returns a Boolean stating if the ad on stage can be skipped (returns true) or not (returns false).

The following API events are available when dealing with skippable ads:

  • adskippablestatechanged: fires when the displayed ads skippable state is changed
  • adskipped: fires when the ad is skipped by the user
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.