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

Properties

adSystem?: string

The source ad server information included in the ad response.

Remarks


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

clickThrough?: string

The website of the advertisement.

Remarks


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

companions?: CompanionAd[]

List of companions which can be displayed outside the player.

Remarks


- 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.

Remarks


- 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.

Remarks


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

height?: number

The height of the ad.

Remarks


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

id?: string

The identifier of the creative.

Remarks


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

isSlate?: boolean

Whether the ad is a slate or not.

Remarks


- Only used for THEOads ads.

readyState?: AdReadyState

The ready state of the ad.

resourceURI?: string

The URI of the ad content.

Remarks


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

skipOffset?: number

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

Remarks


- 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.

Remarks


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

width?: number

The width of the ad, in pixels.

Remarks


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