AI-generated Key Takeaways
-
This document outlines the
AdsManagerLoadedEvent
, which is triggered when ads are loaded from Google or DoubleClick ad servers via anAdsLoader
. -
The
AdsManagerLoadedEvent
extendsImaEvent
and inherits several properties and methods, includingcurrentTarget
,target
,type
,preventDefault
, andstopPropagation
. -
The
getAdsManager
method, available after ads are loaded, returns anAdsManager
object used for managing and playing ads in either a publisher's own video player or the Google-provided one, and it takes acontentPlayback
object and optionaladsRenderingSettings
as parameters. -
The
getUserRequestContext
method retrieves an object provided during the ad load request, allowing publishers to associate the ad response with a specific request.
Properties | |
---|---|
current
|
Deprecated.
Inherited from
|
target
|
The object on which the event was raised (and to which a listener was added).
Inherited from
|
type
|
Inherited from
|
Methods | |
---|---|
get
|
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.
|
get
|
During ads load request it is possible to provide an object that is available once
the ads load is complete.
|
prevent
|
Deprecated.
Inherited from
|
Properties
Optional
currentTarget
currentTarget?: object
Optional
target
target?: object
type
type: string
Methods
getAdsManager
getAdsManager(contentPlayback: object, adsRenderingSettings?: AdsRenderingSettings): AdsManager
Parameters | |
---|---|
contentPlayback: object
|
Player that plays back publisher's content. This must be an object that
contains the property currentTime , which allows the SDK to query
playhead position to properly display midrolls in case ad server responds with
an ad rule. The HMTL5 video element fulfills these requirements. You may
optionally implement your own playhead tracker, as long as it fulfills the above
requirements.
|
|
Optional settings to control the rendering of ads. |
Returns | |
---|---|
AdsManager
|
AdsManager that manages and plays ads. |
getUserRequestContext
getUserRequestContext(): object
Returns | |
---|---|
object
|
The user request content object. |
preventDefault
preventDefault(): void