This guide provides an overview of the SDK lifecycle and the interactions between your video player, the IMA SDK, and an ad server.
The following diagram illustrates and annotates the interactions among your video player, the IMA SDK v3, and an ad server. The ad server may be using DoubleClick for Publishers (DFP), AdSense for Video (AFV), or Ad Exchange (AdX). The diagram helps you visualize how things will work when you finish implementing your integration with the SDK.
A Line Item targets an Ad Unit in DFP.
The web page loads the IMA SDK via
- an embedded
scripttag for HTML5
- along with the app for iOS and Android
- an embedded
IMA SDK requests a VAST Response for the specific Ad Unit from DFP or AFV/AdX depending on the ad tag.
The ad server selects the best ad:
- DFP Ad Unit filters Line Item candidates
- AdSense/Ad Exchange runs an auction
The ad server sends a VAST response with its URL to IMA SDK.
The IMA SDK parses the VAST response and determines the correct media type based on environment.
The IMA SDK retrieves the in-line video creative (and companion ads if needed).
The video player negotiates the details with the IMA SDK and plays the ads.
The IMA SDK fires an impression ping (and VAST tracking events as needed).
Interactions between SDK and video player
The following diagram illustrates and annotates the interactions between the IMA SDK v3 and your video player. It is meant to help you visualize how things will work when done implementing your integration. The diagram applies to HTML5 integrations.
This diagram shows the full lifecycle of the IMA SDK. Constructor and method calls are highlighted in blue, events are highlighted in red, and error conditions are shown with red connectors and red text. Use this as a reference as you work through your IMA implementation.