Bitmovin Player API 8.269.0
    Preparing search index...

    Interface OmSdkTracker

    You will have to include the AdvertisingOmSdk module into the player before creating an instance.

    If you are using the AdvertisingIma module only the onAccessMode callback will have an effect.


    <script type="text/javascript" src="./bitmovinplayer.js"></script>
    <script type="text/javascript" src="./modules/bitmovinplayer-advertising-bitmovin.js"></script>
    <script type="text/javascript" src="./modules/bitmovinplayer-advertising-omsdk.js"></script>
    <!-- your html body here -->
    <script type="text/javascript">
    bitmovin.player.Player.addModule(bitmovin.player['advertising-bitmovin'].default);
    bitmovin.player.Player.addModule(bitmovin.player['advertising-omsdk'].default);
    var conf = {
    key: '<yourPlayerKey>',
    advertising: {
    adBreaks: [{
    tag: {
    url: '<http://location-of-your-ad.xml>',
    type: 'vast'
    },
    position: 'pre',
    }],
    trackers: {
    omSdk: {
    partnerName: '<yourOmSdkPartnerName>',
    partnerVersion: '<yourOmSdkParnterVersion>',
    },
    }
    },
    };
    var player = new bitmovin.player.Player(document.getElementById('player'), conf);
    interface OmSdkTracker {
        contentUrl?: string;
        onAccessMode?: (ad: any) => OmSdkAccessModeRules;
        partnerName: string;
        partnerVersion: string;
        serviceWindowProxy?: "parent" | "self" | "top";
        verificationResources?: VerificationResource[];
    }
    Index
    contentUrl?: string

    Allows you to customize the current content url used. This can be useful when the same urls with different parameters need to be included under the same content url for easier tracking.

    If the content url is not provided the default current href will be used.

    onAccessMode?: (ad: any) => OmSdkAccessModeRules

    By default accessMode will be set as AccessMode.FULL for all requests when using the Bitmovin Ad module. When using the IMA Ad module the default will be AccessMode.LIMITED.

    For usage with the IMA ad module, an array of strings matching an OmidVerificationVendor is required to build a map for the omidAccessRules.

    For usage with the Bitmovin ad module, an array of Regular Expressions needs to be provided. For each verification in the ad, if the JavaScriptResource matches one regular expression the appropriate access mode will be used to construct a VerificationScriptResource.

    If one entry is in two different access modes, the more restrictive one will be applied.

    Type Declaration

      • (ad: any): OmSdkAccessModeRules
      • Parameters

        • ad: any

          The ad object that is currently being played. For IMA this will be the AdsRequest for which the access rules should apply.

        Returns OmSdkAccessModeRules


    const rulesForBAM: OmSdkAccessModeRules = {
    limited: [new RegExp('examplevendor1.com/.*$')],
    full: [/examplevendor2\.com/],
    };
    const rulesForIMA: OmSdkAccessModeRules = {
    limited: ['OTHER'],
    domain: ['DOUBLEVERIFY', 'GOOGLE'],
    };
    const omSdkTracker: OmSdkTracker = {
    onAccessMode: _adOrAdRequest => (isUsingIMA ? rulesForIMA : rulesForBAM),
    };
    partnerName: string

    The partner name associated with your OM SDK account

    partnerVersion: string

    The version associated with your OM SDK account

    serviceWindowProxy?: "parent" | "self" | "top"

    By default, the OM SDK Session Client Library will assume the Service Script is present in the same frame the library is loaded in. Use this config to override the behavior. Default is top to indicate that window.top shall be used.

    verificationResources?: VerificationResource[]

    By default it will use an empty array. Allows loading of verification urls.


    const adConfig: AdvertisingConfig = {
    adBreaks: [
    // your ads here
    ],
    trackers: {
    omSdk: {
    partnerName: '<yourOmSdkPartnerName>',
    partnerVersion: '<yourOmSdkParnterVersion>',
    verificationResources: [
    {
    validationScriptUrl:
    './Validation-Script/omid-validation-verification-script-v1.js',
    },
    ],
    },
    },
    };