Class: AdsLoader

Constructor

AdsLoader

new AdsLoader(container)

Parameter

container

The display container for ads.

Value must not be null.

Methods

contentComplete

contentComplete()

Signals to the SDK that the content is finished. This will allow the SDK to play post-roll ads, if any are loaded via ad rules.

destroy

destroy()

Cleans up the internal state.

getSettings

getSettings() returns ImaSdkSettings

Returns the IMA SDK settings instance. To change the settings, just call the methods on the instance. The changes will apply for all the ad requests made with this ads loader.

Returns

non-null ImaSdkSettings The settings instance.

getVersion

getVersion() returns string

Returns the version of the current SDK.

Returns

string 

requestAds

requestAds(adsRequest, userRequestContext)

Request ads from a server.

Parameter

adsRequest

AdsRequest

AdsRequest instance containing data for the ads request.

Value must not be null.

userRequestContext

Optional

Object

User-provided object that is associated with the ads request. It can be retrieved when the ads are loaded.

Value must not be null.