Radiant Media Player

Ad scheduler



Documentation sections


Features summary

Insert pre-roll, mid-roll and/or post-roll ads at designated timestamps

Suitable for linear, non-linear (or both) ads

Compatible with on-demand and live media content for desktop and mobile devices

Works with Google IMA SDK and rmp-vast

Does not require VMAP support


1 pre-roll, 2 mid-roll at 30s and 60s, 1 post-roll video ads

<script src="https://cdn.radiantmediatechs.com/rmp/5.0.3/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
  // Streaming source - MP4 progressive download in this example
  var src = {
    mp4: [
      'https://your-mp4-url.mp4'
    ]
  };
  // Define ad-schedule
  var schedule = {
    // Preroll
    preroll: 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml',
    // Midroll
    midroll: [
      [30, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear-skippable.xml'],
      [60, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear-skippable.xml']
    ],
    // Postroll
    postroll: 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml'
  };
  var settings = {
    licenseKey: 'your-license-key',
    width: 640,
    height: 360,
    src: src,
    poster: 'https://your-poster-url.jpg',
    ads: true,
    // Pass ad schedule
    adSchedule: schedule
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  rmp.init(settings);
</script>

Cycling video ads in a live stream

For live video streaming you can display mid-roll video ads at fixed or flexible intervals. In the following example a pre-roll is played when the live player is started and mid-roll video ads are played every 2 minutes (when the player is not paused) for the first 10 minutes of the live stream:

<script src="https://cdn.radiantmediatechs.com/rmp/5.0.3/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
  // Streaming source - HLS in this example
  var src = {
    hls: 'https://your-hls-url.m3u8'
  };
  // Define ad schedule
  var schedule = {
    // Preroll
    preroll: 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml',
    // Midroll: a mid-roll ad is played every 120 seconds (2 minutes) for the first 10 minutes of live video
    midroll: [
      [120, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml'],
      [240, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml'],
      [360, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml'],
      [480, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml'],
      [600, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml']
    ]
  };
  var settings = {
    licenseKey: 'your-license-key',
    width: 640,
    height: 360,
    src: src,
    isLive: true,
    poster: 'https://your-poster-url.jpg',
    ads: true,
    // Pass ad schedule
    adSchedule: schedule
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  rmp.init(settings);
</script>

Mid-roll video ads using the midrollRepeat attribute (live or on-demand video)

The midrollRepeat attribute lets you repeat a request to a specific adTag at regular intervals.

<script src="https://cdn.radiantmediatechs.com/rmp/5.0.3/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
  // Streaming source - MP4 progressive download in this example
  var src = {
    mp4: [
      'https://your-mp4-url.mp4'
    ]
  };
  // Define ad schedule
  var schedule = {
    // Preroll
    preroll: 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml',
    // Midroll: every 60 seconds the player will attempt to load a video ad at the given URL.
    midrollRepeat: [60, 'https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml']
  };
  var settings = {
    licenseKey: 'your-license-key',
    width: 640,
    height: 360,
    src: src,
    poster: 'https://your-poster-url.jpg',
    ads: true,
    // Pass ad schedule
    adSchedule: schedule
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  rmp.init(settings);
</script>

Additional support notes

  • Mid-roll timestamps must be expressed in seconds
  • For live video content do not include post-roll data as this would be irrelevant
  • The midrollRepeat setting is capped at 50 midroll ads impression
  • Mid-roll or post-roll video ads are not supported with DVR streaming (only pre-roll linear video ads or overlay ads are currently supported)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.