Radiant Media Player

Video ads documentation



Last updated on January 4, 2017.

Documentation sections:


Quick start guide

Video ads tutorial

Player code example

Radiant Media Player provides a complete client-side video ads solution. To get started you just need to get your hands on an ad tag URL from your ad provider and add it to your player code. Here is an example:

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/v3/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
// You can use HLS, MPEG-DASH or MP4/WebM or a combination of those protocols
// You can use video ads with on-demand, live or DVR video
var bitrates = {
  hls: 'https://streamingrmp-1479.kxcdn.com/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,
  labels: {
    ads: {
      controlBarCustomMessage: 'Ads'
    }
  },
  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=',
  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>

Next sections include more options and documentation for advanced use cases including: ad scheduling, ad waterfalling, ad block detection or our video ads API.


Google IMA SDK

Radiant Media Player video ads implementation is based on Google IMA SDK v3 for HTML5 and Flash video. This allows us to support the latest IAB standards and to provide a rich video ads experience to your viewers following best practices in the industry.


Supported ad-servers

You can make video ad requests to any VAST-compliant ad server with Radiant Media Player. Our customers have successfully used our player with DoubleClick for Publishers (DFP), the Google AdSense Network, SmartAdServer, StickyADS and more.


Supported IAB Video Suite


VAST/VPAID/VMAP support in HTML5 and Flash players

VAST 3 VAST 2 VPAID 2 (HTML5) VPAID 2 (Flash) VPAID 1 (Flash) VMAP 1.0.1
HTML5 player
Flash player

IAB Video Suite support notes

  • The following VAST 3.0 features are not yet supported for Flash video ads: companion adSlotId, companion delivery options, Icons, any VAST 3.0 feature not yet supported by the DFP front end
  • The following VAST 3.0 features are not yet supported for HTML5 video ads: any VAST 3.0 feature not yet supported by the DFP front end
  • The following VMAP features are not yet supported: VMAP-specific tracking events, VMAP-specific error codes, Overlay ads, Time offsets other than hh:mm:ss or "start" and "end" (Flash still supports only hh:mm:ss offsets), Display breakType attribute, repeatAfter attribute
  • The following features are not supported on iPhone: Non-linear ads (Overlays), Skippable (non-TrueView), TrueView InStream
  • Flash VPAID support in HTML5 player requires the device being used to view the page to support Flash

Additional support notes

We provide the technology for you to serve video ads in our web video player. Revenue generated with video ads remains 100% yours.

Our video ads implementation is based on Google IMA SDK v3 (HTML5 + Flash).


Supported OS/browsers

  • HTML5 video ads on desktop: Chrome, Firefox, Safari 8+, Internet Explorer 11, MS Edge
  • HTML5 video ads on mobile: Chrome for Android 4+, Safari for iOS 9+, MS Edge for Windows 10+ mobile
  • Flash video ads: Flash version 11.5+ on Windows 7+ & Mac OS 10.10+

Video ads may work in other environments but they are not officially supported.

When version for a browser is not specified we support the latest version of this browser.


Supported ad types

  • Linear video ads: pre-roll, mid-roll, post-roll on mobile & desktop
  • Skippable ads with InStream TrueWiew support (AdSense & DoubleClick)
  • Ad pods (playlist of video ads) & bumpers
  • Non-linear ads (overlays)
  • Companion ads (through Google Publisher Tag (GPT) or our video ads API)
  • All DoubleClick, Ad Exchange or AdSense supported video ad type

TrueView is not supported on iPhone/iPod.


Supported streaming protocols for media content

The following streaming protocols can be used for media content delivery when video ads are enabled within the player (this is for the media content behind the ad, not the ad itself, see next section for the ad):

  • On-demand video: HLS, MPEG-DASH, MP4 & WebM progressive download
  • Live video: HLS & MPEG-DASH
  • DVR video: HLS (pre-roll & overlay ads only)

Supported formats and streaming protocols for the ad

A VAST response should hold information about the nature of the creative (type, size, bitrate ...) being returned. A VAST response can hold several formats at various bitrates so that an ad can be displayed on a larger range of devices. Radiant Media Player player is equipped with a bandwidth and viewport size detection mechanism for playback of video ads. As such and assuming the creative type, size and bitrate can be found in the VAST response the player will automatically select the best suitable candidate to playback the ad based on device capabilities:

Example of formats (MIME types) that can be used for the ad:

  • Linear creatives: video/mp4, video/webm, application/vnd.apple.mpegurl, video/3gpp, video/x-flv ...
  • Non-linear creatives: image/png, image/jpeg ...
  • VPAID creatives: application/x-shockwave-flash, application/javascript ...

For an example of a VAST response with a combination of formats see this adTag.

It is possible to stream video ads with adaptive bitrate streaming in HLS. However this is only possible where HLS is natively supported in HTML5 video (macOS Safari, iOS Safari, Android Chrome, MS Edge) and assuming a proper HLS stream is present in the VAST response.

CORS settings

To be servable in a JavaScript environment a VAST ad server's response must include the following HTTP CORS headers:
  • Access-Control-Allow-Origin: <origin header value>
  • Access-Control-Allow-Credentials: true
Radiant Media Player video ads implementation is based on Google IMA SDK. Hence the value for Access-Control-Allow-Origin should include: imasdk.googleapis.com. More information on the subject can be obtained here.

Example of properly set HTTP CORS headers:

access-control-allow-credentials:true
access-control-allow-headers:Origin, X-Requested-With, Content-Type, Accept, Range
access-control-allow-origin:http://imasdk.googleapis.com

In Apache 2.4.* this can be done as follows:

SetEnvIfNoCase Origin "https?://(www\.)?(imasdk\.googleapis\.com)(:\d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
Header set Access-Control-Allow-Credentials true

Test your adTag

Our video ads testing page will allow you to test your adTagUrl with Radiant Media Player in both HTML5 and Flash. If you want to try more video ads options you can request a free 14 days trial.

Video ads player settings

HTML5 Flash

General settings

ads: Boolean

Activate or not video ads within the player. Default: false.
As of Radiant Media Player version 3 the custom ad message is set through player labels

adTagUrl: String

Specifies the ad tag url that is requested from the ad server. Default: ''. This can hold both HTML5 and Flash video ads information. This is a required setting.
You need to use fully qualified URL for your adTagUrl

adTagFlashUrl: String
This setting has been added with Radiant Media Player version 3.6.7

By default the player will use the same adTagUrl for the HTML5 and Flash renditions of the player. Using the adTagFlashUrl setting you can define a specific URL for your adTag that will only apply to the Flash rendition of the player. Default: ''.
You need to use fully qualified URL for your adTagFlashUrl

adLocale: String

The targeted language for the video ads. ISO 639-1 (two-letter) code. This option is only supported with HTML5 video ads. Default: 'en'.
Some languages like Portuguese may require more than a two-letter code. For Portuguese Portuguese use 'pt_pt' and for Brazilian Portuguese use 'pt_br'. Contact us if you are in doubt about which language code to use.

adCountDown: Boolean

A countdwon to be displayed within the player control bar. It shows the remaining time for the video ads. This option works with HTML5 and Flash video. Default: false.
If you are using video ads from AdSense or Ad Exchange set adCountDown: false. This is because most ads from AdSense or Ad Exchange already have a built-in ad countdown.

adUseStyledLinearAds: Boolean
This setting has been added with Radiant Media Player version 3.6.0

Render linear ads with full UI styling on Desktop. This setting does not apply to AdSense/AdX ads. Ads played in a mobile context already use full UI styling by default (required for touch-compatibility). This setting is only supported for HTML5 video. Default: false.

adUseStyledNonLinearAds: Boolean
This setting has been added with Radiant Media Player version 3.6.0

Render non-linear ads with a close and recall button. This setting is only supported for HTML5 video. Default: true.

adUseWatermarkCountdownAndMessage: Boolean
This setting has been added with Radiant Media Player version 3.6.0

When the control bar is not visible (idle) the player will still display a watermark countdown and message for the playing linear video ad. This setting is only supported for HTML5 video. Default: false.

adMaxNumRedirects: Number
This setting has been added with Radiant Media Player version 3.5.0

Specifies the maximum number of redirects before the subsequent redirects will be denied, and the ad load aborted. The number of redirects directly affects latency and thus user experience. This applies to all VAST wrapper ads. Default: 4.

adSkipButton: Boolean
This setting has been added with Radiant Media Player version 3.4.0

A skip button to be displayed when a linear creative is playing. Default: false.
Do not use this setting with VAST 3 skippable tags otherwise 2 skip buttons may appear on screen. This setting for VAST tag that do not carry skip information within their body.
Do not use this setting with AdSense or Ad Exchange as most tags coming from those providers already include VAST 3 skip information.

adDelayBeforeSkip: Number
This setting has been added with Radiant Media Player version 3.4.0

An offset expressed in seconds that represent the time before the custom skip button should be displayed. Default: 0.

adShowRemainingTime: Boolean
This setting has been added with Radiant Media Player version 3.4.0

When set to true, a remaining time bar UI will be displayed within the player control bar for linear creatives. Default: false. This setting is only supported for HTML5 video.

adRemainingTimeColor: String
This setting has been added with Radiant Media Player version 3.4.0

Set the color of the remaining time bar. Default: 'FFCC00'. This setting is only supported for HTML5 video.

adLoadMediaTimeout: Number
This setting has been added with Radiant Media Player version 3.8.2

Timeout (in milliseconds) when loading a video ad media file. If loading takes longer than this timeout, the ad playback is cancelled and the next ad in the pod plays, if available. Default: -1, for the default of 15000 milliseconds (15 seconds).

adMaxBitrate: Number
This setting has been added with Radiant Media Player version 3.8.2

Maximum recommended bitrate. The value is in kbit/s. The player will pick media with bitrate below the specified max, or the closest bitrate if there is no media with lower bitrate found. Default: -1, means the bitrate will automatically be selected by the player.

adLinearHideControls: Boolean
This setting has been added with Radiant Media Player version 3.8.1

Setting adLinearHideControls to true cause the player UI to be hidden when a linear video ad is played. Note that for VPAID ads the controls are always hidden (it is up to the VPAID ad to provide controls or not). Default: false.


AdTag Targeting Macros

DFP macros

Radiant Media Player is built on top of Google IMA SDK for HTML5 and Flash video. As such all tag variables produced by the DFP server are supported.

VAST 3 macros

Sometimes ad servers would like to collect metadata from the video player when tracking event URIs are accessed. This data cannot be built into the URI at the time the VAST response is built and served.

The following macros enable the video player to provide certain details to the ad server at the time tracking URIs are accessed and are supported with Radiant Media Player:

  • [CACHEBUSTING]
  • [ERRORCODE]
  • [ASSETURI]

Currently not supported: [CONTENTPLAYHEAD]

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