google.ima. AdsManagerLoadedEvent
This event is raised when ads are successfully loaded from the Google or DoubleClick ad servers through an AdsLoader. You can register for this event on AdsLoader.
Enumeration
Type
string
Types of AdsManagerLoadedEvents.
Value |
|
---|---|
ADS_MANAGER_LOADED |
Fired when the ads have been loaded and an AdsManager is available. |
Property
Type
string
Types of AdsManagerLoadedEvents.
Value |
|
---|---|
ADS_MANAGER_LOADED |
Fired when the ads have been loaded and an AdsManager is available. |
Methods
getAdsManager
getAdsManager(contentPlayback, adsRenderingSettings) returns AdsManager
After ads are loaded from the Google or DoubleClick ad servers, the publisher needs to play these ads either in their own video player or in the Google-provided video player. This method returns an AdsManager object. The AdsManager supports playing ads and allows the publisher to subscribe to various events during ad playback.
Parameter |
|
---|---|
contentPlayback |
Object Player that plays back publisher's content. This
must be an object that contains the property Value must not be null. |
adsRenderingSettings |
Optional (undefined or non-null AdsRenderingSettings) Optional settings to control the rendering of ads. |
- Throws
-
non-null ima.AdError
if ads manager could not be created. - Returns
-
non-null AdsManager
AdsManager that manages and plays ads.
getUserRequestContext
getUserRequestContext() returns (null or Object)
- Returns
-
(null or non-null Object)
During ads load request it is possible to provide an object that is available once the ads load is complete. One possible use case: relate ads response to a specific request and use user request content object as a key for identifying the response.