Ad

interface Ad


An object that holds data corresponding to the main Ad.

Summary

Public functions

String!

Returns the ad ID as specified in the VAST response.

AdPodInfo!

Returns the pod metadata object.

String!

Returns the ad system as specified in the VAST response.

Array<String!>!

Returns the IDs of the ads' creatives, starting with the first wrapper ad.

Array<String!>!

Returns the wrapper ad IDs as specified in the VAST response.

Array<String!>!

Returns the wrapper ad systems as specified in the VAST response.

String!

Returns the advertiser name as defined by the serving party.

(Mutable)List<CompanionAd!>!

Returns the companions for the current ad while using DAI.

String!

Returns the content type of the currently selected creative, or null if no creative is selected or the content type is unavailable.

String!

Returns the Industry Standard Commercial Identifier (ISCI) code for an ad.

String!

Returns the ID of the selected creative for the ad,

String!

Returns the first deal ID present in the wrapper chain for the current ad, starting from the top of the chain.

String!

Returns the description of this ad from the VAST response.

Double

Returns the duration of the ad in seconds, -1 if not available.

Int

Returns the height of the selected creative if non-linear, else returns 0.

Double

Returns the number of seconds of playback before the ad becomes skippable.

String!

Returns the URL associated with the survey for the given ad.

String!

Returns the title of this ad from the VAST response.

String!

Returns custom parameters associated with the ad at the time of ad trafficking.

(Mutable)Set<UiElement!>!

Returns the set of ad UI elements the IMA SDK renders for this ad.

Array<UniversalAdId!>!

The list of all universal ad IDs for this ad.

Int

Returns the VAST bitrate in Kbps of the selected creative.

Int

Returns the VAST media height in pixels of the selected creative.

Int

Returns the VAST media width in pixels of the selected creative.

Int

Returns the width of the selected creative if non-linear, else returns 0.

Boolean

Indicates whether the ad’s current mode of operation is linear or non-linear.

Boolean

Indicates whether the ad can be skipped by the user.

Public functions

getAdId

fun getAdId(): String!

Returns the ad ID as specified in the VAST response.

getAdPodInfo

fun getAdPodInfo(): AdPodInfo!

Returns the pod metadata object.

getAdSystem

fun getAdSystem(): String!

Returns the ad system as specified in the VAST response.

getAdWrapperCreativeIds

fun getAdWrapperCreativeIds(): Array<String!>!

Returns the IDs of the ads' creatives, starting with the first wrapper ad.

getAdWrapperIds

fun getAdWrapperIds(): Array<String!>!

Returns the wrapper ad IDs as specified in the VAST response.

getAdWrapperSystems

fun getAdWrapperSystems(): Array<String!>!

Returns the wrapper ad systems as specified in the VAST response.

getAdvertiserName

fun getAdvertiserName(): String!

Returns the advertiser name as defined by the serving party.

getCompanionAds

fun getCompanionAds(): (Mutable)List<CompanionAd!>!

Returns the companions for the current ad while using DAI. Returns an empty list in any other scenario.

getContentType

fun getContentType(): String!

Returns the content type of the currently selected creative, or null if no creative is selected or the content type is unavailable. For linear ads, the content type is only going to be available after the START event, when the media file is selected.

Returns
String!

The content type, null if not available.

getCreativeAdId

fun getCreativeAdId(): String!

Returns the Industry Standard Commercial Identifier (ISCI) code for an ad. This is the Ad-ID of the selected creative in the VAST response.

getCreativeId

fun getCreativeId(): String!

Returns the ID of the selected creative for the ad,

getDealId

fun getDealId(): String!

Returns the first deal ID present in the wrapper chain for the current ad, starting from the top of the chain.

getDescription

fun getDescription(): String!

Returns the description of this ad from the VAST response.

Returns
String!

The description, null if not specified.

getDuration

fun getDuration(): Double

Returns the duration of the ad in seconds, -1 if not available.

getHeight

fun getHeight(): Int

Returns the height of the selected creative if non-linear, else returns 0.

getSkipTimeOffset

fun getSkipTimeOffset(): Double

Returns the number of seconds of playback before the ad becomes skippable. -1 is returned for non-skippable ads, or if the value is unavailable.

getSurveyUrl

fun getSurveyUrl(): String!

Returns the URL associated with the survey for the given ad.

getTitle

fun getTitle(): String!

Returns the title of this ad from the VAST response.

Returns
String!

The title, null if not specified.

getTraffickingParameters

fun getTraffickingParameters(): String!

Returns custom parameters associated with the ad at the time of ad trafficking.

getUiElements

fun getUiElements(): (Mutable)Set<UiElement!>!

Returns the set of ad UI elements the IMA SDK renders for this ad. This set may be different from the set of UI elements provided at setUiElements, because in some cases, some elements may be required to be displayed or unable to be displayed.

getUniversalAdIds

fun getUniversalAdIds(): Array<UniversalAdId!>!

The list of all universal ad IDs for this ad.

getVastMediaBitrate

fun getVastMediaBitrate(): Int

Returns the VAST bitrate in Kbps of the selected creative.

getVastMediaHeight

fun getVastMediaHeight(): Int

Returns the VAST media height in pixels of the selected creative.

getVastMediaWidth

fun getVastMediaWidth(): Int

Returns the VAST media width in pixels of the selected creative.

getWidth

fun getWidth(): Int

Returns the width of the selected creative if non-linear, else returns 0.

isLinear

fun isLinear(): Boolean

Indicates whether the ad’s current mode of operation is linear or non-linear. Currently non-linear ads are not implemented and this will always return true.

isSkippable

fun isSkippable(): Boolean

Indicates whether the ad can be skipped by the user.