Video Advertising Suite

Docs

> Documentation-Index > Setup Guide

smartClientCore

Global Config

debug : Boolean

Enables log output to the console from the start. In addition, the log output can be activated at runtime by calling localStorage.setItem ('debug', true);.

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.

adRequestMethod : string

By default, ads are requested through XHR. This may not work with applications which target devices that do not support CORS or have not implemented the XMLHTTPRequest object, especially HbbTV apps for SmartTVs. As an alternative, ads can be requested through JSONP. Possible values are smartclientcore.AD_REQUEST_METHOD.XHR (the default if omitted) and smartclientcore.AD_REQUEST_METHOD.JSONP.

adReinsertion : Object

homad : Object

The add-on has been extended with the HOMAD HTML5 solution to help bypassing ad-blockers. All ad-related resources (tags, creative files, trackers) will be redirected to HOMAD once they get blocked for any reason.

enabled : Boolean - Enables HOMAD ad-reinsertion. Disabled by default.

setup : Object - HOMAD configuration

Param Type Description
globalConfig string URI to HOMAD's global configuration file.
clientConfig string URI to the client-specific configuration file.
enableSessionCoverage Boolean Decide whether ad-blockers should be detected again when requesting a new ad-break (default behavior) or not.

Disabled by default.
activationCallback(reason number) Promise Is called whenever the add-on detects a scenario that blocks or would block an ad-related request.
Based on the specified reason the player has to decide whether the current ad-slot must be requested again through HOMAD or not.

Resolves if the publisher decides to re-call the current ad-break through HOMAD.

If the activationCallback is omitted or does not respond within 250 milliseconds, HOMAD will be automatically activated (if enabled before).

let globalAdConfig = smartclientcore.SCHEMA.create(smartclientcore.SCHEMA.GLOBAL_CONFIG);
globalAdConfig.adReinsertion = {
    homad: {
        enabled: true,
        setup: {
            globalConfig: 'https://s3.amazonaws.com/homad-global-configs.schneevonmorgen.com/global_config.json',
            clientConfig: 'https://test.s3.amazonaws.com/homad/homadConfigTestHttps.json',
            enableSessionCoverage: true,
            activationCallback: (reason) => {
                return new Promise((resolve, reject) => {

                    // The reason for activating HOMAD sounds reasonable?
                    resolve();

                    // otherwise
                    //reject();
                });
            }
        }
    }
};

Activation Reason - Codes Table

Code Description
1000 Timeout of ad-request URIs
1001 XHR request status is not 200 (ok)
1004 Timeout of wrapper request chain
1010 Timeout of media file request URIs
1013 General load error of media file URIs

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: IAB

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.

timeoutScriptLoad : number - Representing the number of seconds a OMID vendor can take to load and initialize its code before being terminated. Defaulting to 0.5 seconds if omitted.

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.

timeouts : Object

let globalAdConfig = smartclientcore.SCHEMA.create(smartclientcore.SCHEMA.GLOBAL_CONFIG);
globalAdConfig.timeouts = {
    adRequest: 1,
    adRequestChain: 2,
    adSlotRequest: 4,
    contentRequest: 3,
    homadReadiness: 2,
    nonlinearMaxDuration: 10,
    videoRequest: 3,
    vpaidReadiness: 3,
    vpaidRequest: 1
};

adRequest : number

The number of seconds a single ad request can take to load before being terminated.
Default is 1 seconds.

adRequestChain : number

The total number of seconds a single ad request chain (VAST Wrappers and final VAST Inline tag) can take to load before being terminated.
Default is 2 seconds.

adSlotRequest : number

The total number of seconds an ad-slot request (from calling initAdSlot until the Promise resolves or rejects) can take before being terminated.
Default is 4 seconds.

contentRequest : number

The total number of seconds the video player can take to answer the releaseContent request to the player facade (see FacadeBase.releaseContent()). If the Promise is neither resolved nor rejected within the specified time, the AdSlot becomes terminated. The add-on responds by sending a general error with code 11 (ERROR_CODE.SESSION.NOT_RESTORABLE) and message SessionError: Reset content timed out. Player did not respond. Default is 3 seconds.

homadReadiness : number

The total number of seconds the HOMAD initialization can take before being terminated.
Default is 2 seconds.

nonlinearMaxDuration : number

The maximum time in seconds a NonLinear ad is displayed (from triggering the impression) before being terminated. Note: The timer becomes paused for the time a creative has entered the linear state.
Default is 10 seconds.

videoRequest : number

Representing the number of seconds a video creative can take to load before being terminated.
Default is 3 seconds.

vpaidReadiness : number

Representing the number of seconds a VPAID creative can take to initialize and respond (from calling VPAID.initAd() until the creative triggers the AdLoaded event) before being terminated.
Default is 3 seconds.

vpaidRequest : number

Representing the number of seconds a VPAID creative (JavaScript resource) can take to load before being terminated.
Default is 1 seconds.