Radiant Media Player

Custom video ad scheduling



In the above example 1 pre-roll is played at player start up, then 1 mid-roll at 60 seconds and 1 post-roll at the end of content.


Features

Works with HTML5 and Flash video ads

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

Design a TV like experience with seamless multiple pre/mid/post roll video ads

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

Compatible with on-demand and live video content

Does not require VMAP support


Documentation

HTML5 Flash

Documentation sections

Use your own ad tags for consistent testing! The below ad tags are test Google-provided ad tags. They may or may not be available when requested.


1 pre-roll, 1 mid-roll, 1 post-roll video ads

<script src="https://cdn.radiantmediatechs.com/rmp/v3/latest/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
// Define bitrates
var bitrates = {
  mp4: [
    'https://rmpsite-1479.kxcdn.com/media/bbb-360p.mp4'
  ]
};
// Define schedule
var schedule = {
  // Preroll
  preroll: [
    '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='
  ],
  // Midroll
  midroll: [
    [60, '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=']
  ],
  // Postroll
  postroll: [
    '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%3Dredirectlinear&correlator='
  ]
};
var settings = {
  licenseKey: 'your-license-key',
  delayToFade: 3000,
  width: 640,
  height: 360,
  bitrates: bitrates,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg',
  ads: true,
  // Inject schedule in player settings
  adSchedule: schedule
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
// Initialize player
rmp.init(settings);
</script>

The preroll and midroll items can hold information for non-linear (overlay, banner ...) or linear ads (video, full-slot ...).

Since Radiant Media Player 3.7.1 you can input sub-second timestamps for the midroll parameter within the custom scheduler. This is only supported for on-demand video. Example:

midroll: [
    [30.6, 'your-ad-tag-url'],
    [48.4, 'your-ad-tag-url']
]

This feature can help to better insert ad-break at specific timestamps however it should be noted that modern browsers only allow for 200-400 ms precision when it comes to time positioning accuracy.


TV-like experience: seamless multiple pre/mid/post roll video ads

This feature has been added with player version 3.0.0

The fully featured TV-like experience is only provided for HTML5 video. For Flash only the first video ad of each set will be played (i.e. only 1 preroll, 1 midroll at each timestamp, 1 postroll).

When using the player in its TV-like mode it is implied that each ad must be a linear video-compatible ad for a consistent user experience.

Multiple seamless pre/mid/post roll video ads are set as an array:

<script src="https://cdn.radiantmediatechs.com/rmp/v3/latest/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
// Define bitrates
var bitrates = {
  mp4: [
    'https://rmpsite-1479.kxcdn.com/media/ed-360p.mp4'
  ]
};
// Define schedule
var schedule = {
  // Multiple preroll video ads
  preroll: [
    '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=',
    'https://www.radiantmediaplayer.com/vast/tags/inline.xml',
  ],
  midroll: [
    [60, '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%3Dredirectlinear&correlator='],
    [60, 'https://www.radiantmediaplayer.com/vast/tags/inline.xml']
  ],
  postroll: [
    '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://www.radiantmediaplayer.com/vast/tags/inline.xml'
  ]
};
var settings = {
  licenseKey: 'your-license-key',
  delayToFade: 3000,
  width: 640,
  height: 360,
  bitrates: bitrates,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg',
  ads: true,
  // Inject schedule in player settings
  adSchedule: schedule
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
// Initialize player
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/v3/latest/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
// Define bitrates
var bitrates = {
  hls: 'https://streamingrmp-1479.kxcdn.com/testlive/smil:live.smil/playlist.m3u8'
};
// Define schedule
var schedule = {
  // Preroll
  preroll: [
    '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='
  ],
  // Midroll: a mid-roll ad is played every 120 seconds (2 minutes) for the first 10 minutes of live video
  midroll: [
    [120, '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='],
    [240, '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='],
    [360, '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='],
    [480, '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='],
    [600, '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=']
  ]
};
var settings = {
  licenseKey: 'your-license-key',
  delayToFade: 3000,
  width: 640,
  height: 360,
  bitrates: bitrates,
  isLive: true,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg',
  ads: true,
  // Inject schedule in player settings
  adSchedule: schedule
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
// Initialize player
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/v3/latest/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
// Define bitrates
var bitrates = {
  mp4: [
    'https://rmpsite-1479.kxcdn.com/media/ed-360p.mp4'
  ]
};
// Define schedule
var schedule = {
  // Preroll
  preroll: [
    '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='
  ],
  // Midroll: every 120 seconds the player will attempt to load a video ad at the given URL.
  midrollRepeat: [120, '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=']
};
var settings = {
  licenseKey: 'your-license-key',
  delayToFade: 3000,
  width: 640,
  height: 360,
  bitrates: bitrates,
  // Uncomment the following line if your content is live video. You need to use HLS or MPEG-DASH for live video streaming.
  // isLive: true,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg',
  ads: true,
  // Inject schedule in player settings
  adSchedule: schedule
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
// Initialize player
rmp.init(settings);
</script>

Support notes

  • Mid-roll timestamps must be expressed in seconds
  • Waterfalling with the ad scheduler is supported through the TV-like ad experience (i.e. for example if the first preroll is not available it will skip to the second ... same thing for mid/post roll).
  • For live video content do not include post-roll data as this is irrelevant for live streaming
  • Post-roll video ads are disabled on iOS devices as they can produce notable content recovery issues
  • The midrollRepeat setting is capped at 50 midroll ads impression
  • DVR streaming is only supported with the custom ad scheduler for multiple pre-rolls. Mid-roll or post-roll video ads are not supported.
  • Some advertising solution may limit the number of ad requests you can make. Those limitations can be based on time between requests, ad auction, or session information. Some advertising solution (AdSense for example) may also have policies that specify how to use multiple ad requests for the same player session. It is up to you to make sure you comply with those policies and to insure your advertising solution is properly set up to be used with this scheduler.