Defines a linear ad which requires the playback of the content to stop

interface LinearAd {
    clickThroughUrl?: string;
    clickThroughUrlOpened?: (() => void);
    companionAds?: CompanionAd[];
    data?: AdData;
    duration: number;
    extensions?: VastAdExtension[];
    height: number;
    id?: string;
    isLinear: boolean;
    mediaFileUrl?: string;
    skippable?: boolean;
    skippableAfter?: number;
    uiConfig?: LinearAdUiConfig;
    verifications?: any[];
    width: number;

Hierarchy (view full)

  • Ad
    • LinearAd


clickThroughUrl?: string

The url the user should be redirected to when clicking the ad.

clickThroughUrlOpened?: (() => void)

Callback function to track the opening of the clickThroughUrl.

Type declaration

    • (): void
    • Returns void

companionAds?: CompanionAd[]

The CompanionAds that should be served with the ad.

data?: AdData

Holds various additional ad data.

duration: number

The duration of the ad.

extensions?: VastAdExtension[]

The parsed custom Extension tags



height: number

The height of the ad.

id?: string

Identifier for the ad. This might be autogenerated.

isLinear: boolean

Determines whether an ad is linear, i.e. playback of main content needs to be paused for the ad.

mediaFileUrl?: string

The corresponding media file for the ad.

skippable?: boolean

Specifies whether the ad is skippable or not.


  • This will be removed with player version 9. This can be inferred from skippableAfter
skippableAfter?: number

Time in seconds, after which the ad is skippable. The ad is not skippable if this property is not set.

uiConfig?: LinearAdUiConfig

Holds relevant information for displaying the ad.

verifications?: any[]

The parsed Verification tags of the corresponding AdVerifications tag. Every tag is handled as an array and the property names are the exact same as the tag/attribute names found in the manifest (case-sensitive). The text content of a tag is saved to a content property.

width: number

The width of the ad.