smartClientCore - Setup

Table of contents

Global Config

debug : Boolean

Enables log output to the console.

blockInsecureURL : Boolean

By default insecure URL requests (tags, tracker, media files) will not be executed within secure environment. Default is true.

maxWrapperDepth : Number

When serving an ad involves a chain of wrappers, an infinite loop is possible where a chain of Wrappers never results in a final inline VAST response. In general, wrappers should be limited to ten before resulting in an inline response. If the add-on detects more than ten wrappers, the add-on rejects any subsequent responses in the chain and returns VAST error 302. Default limit is 10 wrappers.

adVerification : Object

OMID : Object

Ad-verification vendors that rely on the Open Measurement Interface Definition API (OMID) are enabled by default. The following properties may be adjusted to enable selected verification vendors only and to limit the measurement session execution time.

More information on OMID and OM SDK available at: https://www.iab.com/omsdk

vendorWhitelist : Array.<string> - List of accepted AdVerification vendors (whitelist). Each specified String has to represent an unique identifier that can be found within the verification code resource URI, most likely the domain name.

If omitted, the add-on tries to load verification code from each vendor.

sessionCleanupDelay : Number - Time value in seconds that specifies a delay for closing the current measurement session after the ad has finished playback. Default is 3 seconds.

The verification code should have sufficient time to ensure any measurement and reporting is completed before cleaning up, in order to minimize discrepancies.

playerHandles : Boolean - Whether the player takes responsibility for Open Measurement, e.g. native implementations of OMID. Defaulting to false if omitted.

nonOMID : Object

Ad-verification vendors that base or rely on proprietary measurement and reporting logic.

meetrics : Boolean - Disabled by default. Enables Meetrics viewability measurement for video advertisment with any VAST and VPAID creative.

skipOffset : Number

Time value in seconds that identifies when skip controls are made available to the end user by default. Advertisers may define a skipoffset value in its VAST tag that has higher priority than the publisher setting.

Sequential Config

adBreak : AdBreak

Setup for an ad break that defines the sequence of commercial ads, sponsored ads and separation clips.

Commercial and sponsored ads (type NORMAL and SPONSORED) are defined by the ad-server VAST manifest (response).

Separation clips (type OPENER, CLOSER, BUMPER) are optional. They can be defined by the publisher. Most likely they depend on the upcoming TV show or editorial video.

tag : string, Array.<string> - Mandatory. Defines the ad-request URL(s) that return a VAST manifest. Allowed values are:

limit : Number - Optional and applicable with Waterfalling only. Defines the maximum number of impressions to be delivered from a chain of ad-requests.

All SPONSORED ads are also counted as valid impression. The limit value should be increased accordingly


Example: main.js - Step 3: Deliver an 2 ads ad-break. There is one fallback ad-server, 
if either of the primary ad-servers returns no valid VAST manifest
===============================================================
const autoplay = true;    // invoke startAdSlot right after the ad manifest has been loaded

adPlugin.initAdSlot({
    tag: [
        'https://adserver-1.com/tag-pre?type=vast3xml',
        'https://adserver-2.com/tag-pre?type=vast3xml',
        'https://fallback-adserver.com/tag-pre?type=vast3xml'
    ],
    limit: 2
}).then(adLoaded => {
    console.log('### Loading AdManifest success.');

    if (autoplay) {
        adPlugin.startAdSlot();
    }

}, failedLoading => {
    console.warn('### Loading AdManifest failed', failedLoading);
});

opener : Object - Optional. Applies to NORMAL and SPONSORED ads. Intro video for the upcoming ad break, played before all other ads.

Other source properties are currently not supported nor required by the add-on. Future versions of the add-on may include streaming resources.

closer : Object - Optional. Applies to NORMAL and SPONSORED ads. Outro video, played after all other ads.

Other source properties are neither supported nor required by the add-on.

bumper : Object - Optional. Applies to NORMAL and SPONSORED ads. Special intro video, played once when switching from commercial to sponsored ads or vice versa. Not served if the ad-server response contains no ads of variant NORMAL or SPONSORED.

Other source properties are neither supported nor required by the add-on.

adPlugin.initAdSlot(
    {
        tag: 'https://adserver.com/tag-pre?type=vast3xml',
        opener: {
            progressive: 'https://yourpage.com/assets/opener-pre.mp4'
        },
        closer: {
            progressive: 'https://yourpage.com/assets/closer-pre.mp4'
        },
        bumper: {
            progressive: 'https://yourpage.com/assets/bumper-pre.mp4'
        }
    }
);

environmentVars : EnvironmentVars

Used for passing implementation-specific runtime variables.

desiredBitrate : Number - Optional. Indicates the desired bitrate in kilobits per second (kbps). The player uses this information to select media files with an appropriate bitrate. Defaulting to null. Note: If set, this will disable the plugin-internal bitrate detection.

desiredMimeTypes : Array.<string> - Optional. Declaration of accepted media types (whitelist). Defaulting to types that the browser eventually is able to play. Types must be compliant with the IANA Media Type standard
Note: If set, this will override the plugin-internal media types. For a list of supported media types see tbd - Glossar Media Types.

desiredVPAIDVendors : Array.<string> - Optional. Declaration of accepted VPAID vendors (whitelist). Each specified String has to represent an unique identifier that can be found within the creative media file URL, most likely the domain name. If omitted, the plugin tries to deliver VPAID creatives from each vendor.

deviceType : string - Optional. Can be either mobile, tablet, desktop or tv. Defaulting to null.

deviceScreenSize : Object - Optional. Maximum size we can achieve when entering fullscreen.

networkReachability : string - Optional. Can be either wwan, wifi or unreachable. Defaulting to null.

Example with desiredBitrate. Other variables will be ignored.

adPlugin.initAdSlot(
    {
        // adBreak
    },{
         desiredBitrate: 1000,
         deviceScreenSize: {
             width: 1024,
             height: 768
         }
     }
 );

Example with deviceType and networkReachability, utilized to calculate an appropriat bitrate.

adPlugin.initAdSlot(
    {
        // adBreak
    },{
        deviceType: 'tablet',
        deviceScreenSize: {
            width: 1024,
            height: 768
        },
        networkReachability: 'wifi'
     }
 );