Class: CompanionAd

  • The CompanionAd class represents a companion ad object during dynamic ad insertion and exposes a subset of ima.CompanionAd properties.

  • The CompanionAd class has a constructor that takes a non-null companion parameter.

  • Methods like getAdSlotId, getContent, getContentType, getHeight, and getWidth are available to retrieve information about the companion ad.

Constructor

CompanionAd

new CompanionAd(companion)

Constructor.

Parameter

companion

Value must not be null.

Methods

getAdSlotId

getAdSlotId() returns (null or string)

Returns

(null or string) 

getContent

getContent() returns string

Returns

string 

getContentType

getContentType() returns (null or string)

Returns

(null or string) 

getHeight

getHeight() returns number

Returns

number 

getWidth

getWidth() returns number

Returns

number