Interface MKAd

Defines basic properties available for every ad type

interface MKAd {
    clickThroughUrl?: string;
    clickThroughUrlOpened?: () => void;
    companionAds?: MKCompanionAd[];
    data?: MKAdData;
    extensions?: MKVastAdExtension[];
    height: number;
    id?: string;
    isLinear: boolean;
    mediaFileUrl?: string;
    verifications?: any[];
    width: number;
}

Properties

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.

companionAds?: MKCompanionAd[]

The CompanionAds that should be served with the ad.

data?: MKAdData

Holds various additional ad data.

extensions?: MKVastAdExtension[]

The parsed custom Extension tags

v1.18.0

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.

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.