THEOplayer Web SDK
    Preparing search index...

    Interface AdInit

    An initializer for a custom Ad.

    interface AdInit {
        adSystem?: string;
        clickThrough?: string;
        companions?: CompanionAd[];
        creativeId?: string;
        customData?: unknown;
        duration?: number;
        height?: number;
        id?: string;
        isSlate?: boolean;
        readyState?: AdReadyState;
        resourceURI?: string;
        skipOffset?: number;
        timeOffset?: number;
        type: AdType;
        universalAdIds?: UniversalAdId[];
        width?: number;
    }

    Hierarchy

    Index

    Properties

    adSystem?: string

    The source ad server information included in the ad response.


    - Available when the Ad.readyState is 'ready'.

    clickThrough?: string

    The website of the advertisement.


    - Available when the Ad.readyState is 'ready'.

    companions?: CompanionAd[]

    List of companions which can be displayed outside the player.


    - Available when the Ad.readyState is 'ready'.
    - Only supported for 'csai' and 'google-dai'.

    creativeId?: string

    The identifier of the selected creative for the ad.


    - Available when the Ad.readyState is 'ready'.

    customData?: unknown

    Additional integration-specific data associated with this ad.

    duration?: number

    The duration of the ad, in seconds.


    - Available when the Ad.readyState is 'ready'.
    - Only available for LinearAd.

    height?: number

    The height of the ad.


    - Available when the Ad.readyState is 'ready'.

    id?: string

    The identifier of the creative.


    - Available when the Ad.readyState is 'ready'.

    isSlate?: boolean

    Whether the ad is a slate or not.


    - Only used for THEOads ads.

    readyState?: AdReadyState

    The ready state of the ad.

    resourceURI?: string

    The URI of the ad content.


    - Available when the Ad.readyState is 'ready'.

    skipOffset?: number

    Offset after which the ad break may be skipped, in seconds.


    - Available when the Ad.readyState is 'ready'.
    - If the offset is -1, the ad is unskippable.
    - If the offset is 0, the ad is immediately skippable.
    - Otherwise it must be a positive number indicating the offset.

    timeOffset?: number

    The time offset at which content will be paused to play the ad, in seconds.

    type: AdType

    The type of the ad.

    universalAdIds?: UniversalAdId[]

    The list of universal ad ID information of the selected creative for the ad.


    - Only supported for 'csai' and 'google-ima'.

    width?: number

    The width of the ad, in pixels.


    - Available when the Ad.readyState is 'ready'.