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.
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.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-26 UTC."],[[["\u003cp\u003eThis document outlines the \u003ccode\u003eAdsManagerLoadedEvent\u003c/code\u003e, which is triggered when ads are loaded from Google or DoubleClick ad servers via an \u003ccode\u003eAdsLoader\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAdsManagerLoadedEvent\u003c/code\u003e extends \u003ccode\u003eImaEvent\u003c/code\u003e and inherits several properties and methods, including \u003ccode\u003ecurrentTarget\u003c/code\u003e, \u003ccode\u003etarget\u003c/code\u003e, \u003ccode\u003etype\u003c/code\u003e, \u003ccode\u003epreventDefault\u003c/code\u003e, and \u003ccode\u003estopPropagation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetAdsManager\u003c/code\u003e method, available after ads are loaded, returns an \u003ccode\u003eAdsManager\u003c/code\u003e object used for managing and playing ads in either a publisher's own video player or the Google-provided one, and it takes a \u003ccode\u003econtentPlayback\u003c/code\u003e object and optional \u003ccode\u003eadsRenderingSettings\u003c/code\u003e as parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetUserRequestContext\u003c/code\u003e method retrieves an object provided during the ad load request, allowing publishers to associate the ad response with a specific request.\u003c/p\u003e\n"]]],[],null,["| **Note:** This reference page follows TypeScript documentation structure. If you have suggestions for or see issues with the reference documentation, open a thread with your feedback on the [IMA technical forum](https://groups.google.com/g/ima-sdk/).\n\n*** ** * ** ***\n\nsubdirectory_arrow_rightExtends [ImaEvent](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.ImaEvent) \nThis 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.\n\n| Properties ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [currentTarget?](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManagerLoadedEvent#google.ima.AdsManagerLoadedEvent.currentTarget) | **Deprecated.** Inherited from [ImaEvent.currentTarget](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.ImaEvent#google.ima.ImaEvent.currentTarget) |\n| [target?](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManagerLoadedEvent#google.ima.AdsManagerLoadedEvent.target) | The object on which the event was raised (and to which a listener was added). Inherited from [ImaEvent.target](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.ImaEvent#google.ima.ImaEvent.target) |\n| [type](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManagerLoadedEvent#google.ima.AdsManagerLoadedEvent.type) | Inherited from [ImaEvent.type](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.ImaEvent#google.ima.ImaEvent.type) |\n\n| Methods ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getAdsManager](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManagerLoadedEvent#google.ima.AdsManagerLoadedEvent.getAdsManager) | 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. |\n| [getUserRequestContext](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManagerLoadedEvent#google.ima.AdsManagerLoadedEvent.getUserRequestContext) | During ads load request it is possible to provide an object that is available once the ads load is complete. |\n| [preventDefault](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManagerLoadedEvent#google.ima.AdsManagerLoadedEvent.preventDefault) | **Deprecated.** Inherited from [ImaEvent.preventDefault](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.ImaEvent#google.ima.ImaEvent.preventDefault) |\n\nProperties\n\n*** ** * ** ***\n\n`Optional`\ncurrentTarget \ncurrentTarget?:` `object\n| **Deprecated:** Use `target` instead.\n\n*** ** * ** ***\n\n`Optional`\ntarget \ntarget?:` `object The object on which the event was raised (and to which a listener was added).\n\n*** ** * ** ***\n\ntype \ntype:` `string\n\nMethods\n\n*** ** * ** ***\n\ngetAdsManager \ngetAdsManager(contentPlayback: object`, `adsRenderingSettings?: [AdsRenderingSettings](/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRenderingSettings)): [AdsManager](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManager) \nAfter 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.\n\n| Parameters ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 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. |\n| `Optional`` `adsRenderingSettings`: `[AdsRenderingSettings](/interactive-media-ads/docs/sdks/html5/client-side/reference/class/google.ima.AdsRenderingSettings) | Optional settings to control the rendering of ads. |\n\n| Returns ||\n|------------------------------------------------------------------------------------------------------------|----------------------------------------|\n| [AdsManager](/interactive-media-ads/docs/sdks/html5/client-side/reference/interface/google.ima.AdsManager) | AdsManager that manages and plays ads. |\n\n*** ** * ** ***\n\ngetUserRequestContext \ngetUserRequestContext(): object \nDuring 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.\n\n| Returns ||\n|--------|----------------------------------|\n| object | The user request content object. |\n\n*** ** * ** ***\n\npreventDefault \npreventDefault(): void \n| **Deprecated:** No-op. IMA events do not have a default action."]]