Stay organized with collections
Save and categorize content based on your preferences.
The key to reducing latency in your IMA-enabled web page is to do as much
IMA-related setup as early as possible. You can do all of the following on your
web page as early as you like before playing ads:
Create your AdDisplayContainer.
Create your AdsLoader.
Create your AdsRequest.
Request ads.
Obtain your AdsManager instance and register event handlers.
Doing all of the above initializes the IMA SDK and request and parses your
ads response all before the user even clicks play on your video. When you're
ready to play the ads, call AdDisplayContainer.initialize() (always
as the result of a user action), then call AdsManager.init and
AdsManager.start. For more information on making your entire page more responsive, see the tips on evaluating network
performance in the Chrome documentation.
[[["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-01-21 UTC."],[[["To minimize latency in IMA-enabled web pages, perform IMA setup tasks like creating `AdDisplayContainer`, `AdsLoader`, `AdsRequest`, requesting ads, and obtaining the `AdsManager` instance early in the page lifecycle."],["By initializing the IMA SDK and handling ad responses before user interaction, you ensure smoother ad playback when the user initiates it."],["Before playing ads, call `AdDisplayContainer.initialize()` (triggered by user action), followed by `AdsManager.init` and `AdsManager.start` to begin ad playback."],["For broader page performance enhancements, consult Chrome's network performance evaluation resources."]]],[]]