smartClientCore - Setup

Table of contents

Global Config

debug

Enables log output to the console.

blockInsecureURL

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

adVerification

Enables ad-verification provider and applies to all linear ads.

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

Sequential Config

ad-break : 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 - Mandatory. Defines the ad-request URL(s) that return a VAST manifest. Allowed values are:

limit - Optional and applicable with Waterfalling only. Defines how many impressions must be delivered from a chain of ad-requests.

Note: 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 - 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 - 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 - 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 Mediafiles with an appropriate bitrate. Defaulting to null.
Note: If set, this will disable the plugin-internal bitrate detection.

desiredMimeTypes : Array - Optional. Declaration of accepted media types. 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.

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({
    //...
    environmentVars: {
        desiredBitrate: 1000,
        deviceScreenSize: {
            width: 1024,
            height: 768
        }
    },
});
//...

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

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