Video plugin: configure and customize
Overview
This document explains how to customize Equativ's Video plugin, using the configuration section.
Integrate configuration file
When calling sas.video.register(), pass the configuration by adding a configuration property to the main object.
Specify the URL of your JSON configuration file as a string value for the configuration property, as shown in the following example:
sas.video.register({
id: 'myContainer',
adData: {...},
configuration: 'url_to_config_file.json',
...
});Alternatively, pass a JavaScript object containing your configuration settings directly to the configuration property, as shown in the following example:
Example configuration settings
sas.video.register({
id: 'myContainer',
adData: {...},
configuration: {
publisher: {
forceSkipDelay: true,
skipDelay: 5
}
},
...
});Creating a custom configuration is optional. If you omit a parameter in your configuration, the plugin automatically uses the default value from its embedded default configuration.
Loading requirements for configuration file
The Video plugin uses AJAX to load your configuration file when you provide a URL. To ensure the plugin can read the file's content, the server response containing the JSON file must include Cross-Origin Resource Sharing (CORS) headers, as follows:
Access-Control-Allow-Origin: http://yourdomain.com*
Access-Control-Allow-Credentials: trueReplace yourdomain.com with the domain containing the Video plugin.
You don't need to send CORS headers in the following cases:
- You pass the configuration directly as a JavaScript object, not with a URL.
- The configuration file is loaded from the same domain as your website containing the Video plugin.
Customize player
The player section controls the core appearance and functionality of the video player.
| Parameter | Type | Default value | Description |
|---|---|---|---|
autoHideControls |
Boolean | true |
A boolean enabling or disabling the auto-hide behavior of the control bar for the CONTROL_BAR_MODE_FLOATING and CONTROL_BAR_MODE_FLOATING_CONDENSED modes. |
controlBarMode |
String | CONTROL_BAR_MODE_FLOATING |
The display mode of the control bar. Available values:
|
enableCountdownSkip |
Boolean | true |
A boolean showing or hiding the countdown before the current ad can be skipped. |
enableCountdownVideo |
Boolean | true |
A boolean showing or hiding the countdown before the end of the linear ad break. The countdown duration might change, if an ad is skipped or a passback is used. |
enableFullscreen |
Boolean | true |
A boolean showing or hiding the fullscreen/exit fullscreen buttons. |
enablePause |
Boolean | false |
A boolean showing or hiding the pause button. |
enableSound |
Boolean | true |
A boolean showing or hiding the mute/unmute buttons. |
scaleMode |
String | SCALE_MODE_LETTERBOX |
The video scale mode. Available values:
Some VPAID-compatible players, such as the Google Interactive Media Ads SDK used with Equativ's Embedded Ad Manager might not support these scale changes. |
The following example shows a player JSON file:
{
"player": {
"scaleMode": "SCALE_MODE_ZOOM",
"enableSound": false,
"enableCountdownSkip": false
}
}Customize labels
The labels in the Video plugin are included in the labels section of the configuration object.
The following table contains the available labels:
| Label | Description |
|---|---|
lbl_countdown_break_midroll |
A text message to notify the user when the mid-roll ad break will finish. |
lbl_countdown_break_postroll |
A text message to notify the user when the post-roll ad break will finish. |
lbl_countdown_break_preroll |
A text message to notify the user when the pre-roll ad break will finish. |
lbl_countdown_skip |
A countdown message displayed before the skip button becomes available. |
lbl_more |
A text displayed on the button used to activate the clickthrough option in HTML5 mode on mobile devices. |
lbl_skip_vpaid |
A text explaining that the VPAID ad can now be skipped. |
You can use the {0} variable in any label. It is automatically replaced by the duration in seconds, when applicable.
To customize the language of labels, refer to the list of available language keys in section “Supported languages”, later in this document.
The following example shows the lbl_countdown_skip label, customized in the languages French ("FR") and English ("EN"):
{
"labels": {
"lbl_countdown_skip": {
"FR": "Vous pourrez passer cette publicité dans {0} secondes",
"EN": "You can skip this ad in {0} seconds"
}
}
}Customize languages
To change the language used by the plugin, pass a language property to the sas.video.register method, as illustrated by the following snippet:
javascript// Sets the language to French
sas.video.register({
id: 'myContainer',
adData: {...},
...,
language: 'FR'
});Supported languages
The Video plugin supports the following languages:
| Language key | Language name |
|---|---|
| DE | German |
| EN | English (default language) |
| ES | Spanish |
| FR | French |
| IT | Italian |
| PL | Polish |
| PT | Portuguese |
| RU | Russian |
| TR | Turkish |
Configure ad formats
Configure overlay ads
The overlays section controls the behavior of overlay ads.
| Parameter | Type | Default value | Description |
|---|---|---|---|
hideDuringPause |
Boolean | true |
A boolean hiding or showing overlays when the content player is paused. |
resize |
Boolean | true |
A boolean resizing the overlays when the player enters fullscreen mode, if set to true. |
The following example shows an overlay configuration with resizing enabled:
{
"overlays": {
"resize": true
}
}Configure companion ads
The companions section controls the display of companion ads.
| Parameter | Type | Default value | Description |
|---|---|---|---|
remove |
Boolean | true |
A boolean which, if set to true, removes the companion ad from its container at the end of the associated linear ad. |
slot |
String | myDivId |
The HTML ID of the default <div> element where the companion is displayed, if no slot is provided in the VAST tag. |
Configure banner ads
The banner section configures the request for a banner ad when the main video content is paused. Set the following keys in the dedicated banner object of sasVideoData.
| Parameter | Type | Default value | Description |
|---|---|---|---|
sas_format_banners |
Number | none | The ID of a banner format, defined in Equativ Monetization Platform. |
sas_target_banners |
String | none | The keyword targeting to use with the banner ad call for sas_format_banners. |
The following example shows a banner ad configuration with the banner format ID and keyword targeting to be applied.
{
"banner": {
"sas_format_banners": '1234',
"sas_target_banners": 'key=value'
}
}Configure publisher
The publisher section contains publisher-specific options.
| Parameter | Type | Default value | Description |
|---|---|---|---|
activeControlsForEmbededAdManager |
Boolean | true |
A boolean specifying if controls are displayed for the Embedded Ad Manager. |
allowConditionalAd |
Boolean | true |
A boolean indicating if conditional ads are accepted. If set to false, any ad flagged as conditional (according to VAST standard) is discarded, and the Video plugin attempts to load a passback ad. This feature is available in VAST 4.0 or later. |
bumperDuration |
Number | 0 |
The amount of time, in seconds, an ad break announcement (“bumper”) is shown. |
bumperPostAdUrl |
String | n/a | The URL of an image to show after an ad break to announce its end. |
bumperPreAdUrl |
String | n/a | The URL of an image to show before an ad break to announce its beginning. |
checkUniversalAdId |
Boolean | false |
A boolean indicating of if the plugin is to check the Ads with the same This feature is available in VAST 4.0 or later. In VAST 4.2, the Video plugin checks all IDs to determine if multiple |
countdownTimeFormat |
String | mm:ss |
The format of the time displayed until the end of the ad break. Available values:
|
enableAdPauseOnWindowChange |
Boolean | true |
A boolean which, if set to true, pauses linear ad breaks when the user switches tabs or windows. Playback automatically resumes when the page regains focus. This is not supported if the player is inside a cross-domain iframe for security reasons. |
enableMobileClickThroughButton |
Boolean | false |
A boolean which, if set to true, enables a "More info" button for click-through functionality on mobile devices, instead of activating click-through on the whole video screen. |
enableSSAR |
Boolean | false |
A boolean indicating if server-side ad rules (SSAR) must be used for this configuration. For more information, see Set video ad rules. |
forceSkipDelay |
Boolean | false |
A boolean which, if set to true, instructs the plugin to ignore the skipOffset attribute from the VAST document and to use the skipDelay parameter instead. |
html5SeamlessFullscreen |
Boolean | false |
A boolean which, if set to true, ensures a seamless fullscreen experience between ads and content. If false, mid-rolls aren't displayed. For more information, see “Fullscreen mode limitations” in Video plugin: known limitations. |
integralAdScienceAnId |
Number | -1 |
The dedicated Ad Network ID used with the Campaign Monitoring solution for publishers, provided by Integral Ad Science (IAS). |
loadHlsJsLibrary |
Boolean | false |
A boolean indicating if the HLS.js library must be loaded on browsers that don't natively support HLS media files. |
muteAdsAtStartup |
Boolean | false |
A boolean indicating if pre-roll ads are muted at startup. For mid-roll and post-roll ads, the volume matches the content player's volume. |
numMaxRedirect |
Number | 5 |
The maximum number of wrapper calls the Video plugin can perform for a single ad, preventing endless loops for wrapper calls. |
numberOfPassbackAds |
Number | -1 |
The number of passback ads requested from the ad server. This feature is available in VAST 3.0 and later.
|
omitCredentials |
Boolean | true |
In case of CORS issues during VAST loading, the Video plugin calls the fetch method a second time, but with different credentials. The first call always has the credential flag set to include. If it fails, the second call has the credential set to omit. Set this parameter to false to make calls only with the include flag. |
pauseMainContentUntilVASTIsLoaded |
Boolean | true |
A boolean indicating if the main player pauses until the ad break data is fully loaded and ready to display. With this parameter, playback of mid-rolls will start at the defined time even if the loading of the ad lasts too long. |
playLastAdBreak |
Boolean | false |
A boolean indicating if the Video plugin must play only the last linear ad break in case the main content is resumed after several ad breaks. |
protocol |
String | "get" |
The ad call type. Available values:
|
replayAd |
Boolean | true |
A boolean indicating if an ad must be displayed when the main content is played again (rewound or replayed). |
requestTimeout |
Number | 3 |
The timeout (in seconds) used for a single request. This value must be lower than the totalTimeout. |
schain |
String |
The SupplyChain Object parameter, which lists all parties selling or reselling the ad opportunity. For more information, see Sellers.json and Supply Chain Object compliancy. |
|
skipDelay |
Number | 10 |
The duration (in seconds) after which a linear ad can be skipped, when forceSkipDelay is set to true. Set it to -1 to make the ad unskippable. |
totalTimeout |
Number | 8 |
The maximum time (in seconds) allowed for the ads in the ad pod.
|
unmuteOnMouseOver |
Boolean | false |
A boolean indicating if ads must be unmuted while playing when the cursor hovers over the screen. |
visibilityThresholdForPlayback |
Number | -1 |
The minimum percentage (0 to 100) of the player's surface that must be visible to enable ad playback. The ad is paused if the visible percentage is less than the defined value. Set to |
visibilityThresholdForUnmute |
Number | -1 |
The minimum percentage (0 to 100) of the player's surface that must be visible to enable sound for the ad. The ad is muted if the visible percentage is less than the defined value. Set to |
vpaidFirst |
Boolean | false |
A boolean which, if set to true, prioritizes VPAID creatives over other media files. |
The following example shows a publisher section with various parameters:
{
"publisher": {
"enableSSAR": true,
"forceSkipDelay": true,
"schain": "1.0,1!exchange1.com,1234,1,publisher,publisher.com",
"skipDelay": 5
}
}Configure modules
The modules section contains options and settings related to external integrations, such as the ID5 Universal ID module.
Each module object has the following structure:
"moduleName": {
"useModule": true,
"config": {
// a list of the dedicated module's parameters
}
}The module isn't used if the module object is missing or if useModule is set to false. The config object is optional if the module doesn't require any parameters.
The id5 module is the only supported module.
| Module name | Description |
|---|---|
id5 |
The ID5 Universal ID module for automated sending of ID5 extended IDs (eids), without requiring additional implementation effort. For the full list of the module's parameters, see Available Configuration Options. Use this module only if the publisher is unable to provide ID5 data independently and must rely on Equativ's contract with the ID5 provider. |
The following example shows an ID5 module:
{
"modules": {
"id5": {
"useModule": true,
"config": {
"pd": "MT1iNTBjYTA4MjcxNzk1YThlN2U0MDEyODEzZjIzZDUwNTE5M2Q3NWMwZjJlMmJiOTliYWE2M2FhODIyZjY2ZWQzJjU9bSVDMyVCNmxsZXIlMjZmcmFuJUMzJUE3b2lz"
}
}
}
}Configure VPAID creatives
The vpaid section contains options that apply only to VPAID creatives.
| Parameter name | Type | Default value | Description |
|---|---|---|---|
enableCountdownVideo |
Boolean | true | A boolean showing or hiding the countdown before the end of the linear ad break. |
enableSkip |
Boolean | true | A boolean displaying or hiding a skip button in the interface. |
enableSkipLabel |
Boolean | true | A boolean showing or hiding the label indicating that the creative is currently skippable. |
generalTimeout |
Number | 3 | The timeout duration (in seconds) for general actions on the VPAID creative (start, stop). |
handleSkipOffset |
Boolean | false |
A boolean indicating if the Video plugin must handle the skip offset. If |
initTimeout |
Number | 3 | The timeout duration (in seconds) for the initialization of the VPAID creative. |
loadTimeout |
Number | 3 | The timeout duration (in seconds) for loading the VPAID creative. |
totalTimeout |
Number | 5 | The total timeout duration (in seconds) for loading, initialization, and start of the VPAID creative. |
The following example shows a vpaid section:
{
"vpaid": {
"enableCountdownVideo": false,
"enableSkipLabel": false,
"loadTimeout": 5
}
}Enrich bid requests (RTB options)
The rtb section contains options that apply only to programmatic (RTB) video insertions. These parameters help qualify bid requests to buyers and improve inventory valuation. Some parameters are automatically generated by the Video plugin.
| Parameter | Type | Description |
|---|---|---|
pgDomain |
String | The decoded URL of the web page where the RTB video insertions are displayed. |
vbrmax |
Number | The maximum bitrate (in Kbps) for the programmatically requested video creatives. By default, this parameter isn't passed in VAST or bid requests. Enable it by setting a positive value. |
vbrmin |
Number | The minimum bitrate (in Kbps) for the programmatically requested video creatives. By default, this parameter isn't passed in VAST or bid requests. Enable it by setting a positive value. |
vdmax |
Number | The maximum duration (in seconds) for the programmatically requested video creatives. By default, this parameter isn't passed in VAST or bid requests. Enable it by setting a positive value. |
vdmin |
Number | The minimum duration (in seconds) for the programmatically requested video creatives. By default, this parameter isn't passed in VAST or bid requests. Enable it by setting a positive value greater than 1. |
vpmt |
Number |
The playback method of the video player. By default, this parameter isn't passed in VAST or bid requests. Enable it by setting one of the following values:
|
The following example shows an rtb section:
{
"rtb": {
"vdmin": 5,
"vdmax": 15,
"vpmt": 1,
"pgDomain": "http://www.somepublisherwebsite.com/some/page"
}
}