SDK アーキテクチャについて学習する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このガイドでは、SDK のライフサイクルと、動画プレーヤー、IMA SDK、広告サーバー間のやり取りの概要について説明します。
基本的な操作
次の図は、動画プレーヤー、IMA SDK、広告サーバー間のやり取りを示しています。広告サーバーでは、アド マネージャー、動画向け AdSense(AFV)、Ad Exchange(AdX)を使用できます。

ウェブページまたはアプリで、次の方法で IMA SDK が読み込まれます。
- HTML5 の埋め込みスクリプトタグ
- Android、Google Cast、iOS、tvOS 向けのアプリ
IMA SDK は、広告サーバー上の特定の広告ユニットの VAST レスポンスをリクエストします。呼び出された広告サーバー(アド マネージャーと AFV または AdX のいずれか)は、広告タグの URL によって決まります。
広告サーバーが最適な広告を選択し、VAST レスポンスを IMA SDK に送信します。広告は次のいずれかの方法で選択されます。
- アド マネージャーの広告ユニットで広告申込情報の候補をフィルタする
- AdSense または Ad Exchange がオークションを実施する
IMA SDK は VAST レスポンスを解析し、環境に基づいて適切なメディアタイプを特定して、インライン動画クリエイティブ(と必要に応じてコンパニオン広告)をウェブページまたはアプリに配信します。
動画プレーヤーは IMA SDK と再生の詳細をネゴシエートし、広告を再生します。
IMA SDK は、必要に応じてインプレッション ping と VAST トラッキング イベントをトリガーします。
Lifecycle
この図は、IMA SDK のライフサイクル全体を示しています。コンストラクタとメソッドの呼び出しは青色でハイライト表示され、イベントは赤色でハイライト表示されます。エラー条件は、赤いコネクタと赤いテキストで示されます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eThis guide explains the lifecycle of the Interactive Media Ads (IMA) SDK and how it facilitates communication between your video player, the SDK, and an ad server (Ad Manager, AdSense for Video, or Ad Exchange).\u003c/p\u003e\n"],["\u003cp\u003eThe process involves the IMA SDK requesting ads from the ad server based on the provided ad tag URL, the ad server selecting and sending a VAST response, and the SDK parsing this response to deliver ads to the video player.\u003c/p\u003e\n"],["\u003cp\u003eThe video player then handles ad playback while the IMA SDK manages tracking events like impressions and VAST events for reporting purposes.\u003c/p\u003e\n"],["\u003cp\u003eThis guide also visually illustrates the entire IMA SDK lifecycle including constructor calls, method calls, events, and potential errors.\u003c/p\u003e\n"]]],[],null,["Select platform: [HTML5](/interactive-media-ads/docs/sdks/html5/client-side/architecture \"View this page for the HTML5 platform docs.\") [Android](/interactive-media-ads/docs/sdks/android/client-side/architecture \"View this page for the Android platform docs.\") [iOS](/interactive-media-ads/docs/sdks/ios/client-side/architecture \"View this page for the iOS platform docs.\") [tvOS](/interactive-media-ads/docs/sdks/tvos/client-side/architecture \"View this page for the tvOS platform docs.\")\n\n\u003cbr /\u003e\n\nThis guide provides an overview of the SDK lifecycle and the interactions\nbetween your video player, the IMA SDK, and an ad server.\n\nBasic interactions\n\nThe following diagram illustrates and annotates the interactions between\nyour video player, the IMA SDK, and an ad server. The ad server can use\nAd Manager, AdSense for Video (AFV), or Ad Exchange (AdX).\n\n1. The web page or app loads the IMA SDK using:\n\n - an embedded script tag for HTML5\n - an app for Android, Google Cast, iOS, or tvOS\n2. The IMA SDK requests a VAST Response for the specific Ad Unit on the ad\n server. The ad server called, which can be either Ad Manager versus AFV or\n AdX, is determined by the ad tag URL.\n\n3. The ad server selects the best ad and sends a VAST response to the IMA SDK.\n Ads are selected using one of the following methods:\n\n - Ad Manager Ad Unit filters Line Item candidates\n - AdSense or Ad Exchange runs an auction\n4. The IMA SDK parses the VAST response, determines the correct media type based\n on environment, and delivers the inline video creative (and\n companion ads if needed) to the web page or app.\n\n5. The video player negotiates the playback details with the IMA SDK and plays\n the ads.\n\n6. The IMA SDK fires an impression ping and VAST tracking events, as needed.\n\nLifecycle\n\nThis diagram shows the full lifecycle of the IMA SDK. Constructor and method\ncalls are highlighted in blue, events are highlighted in red, and error\nconditions are shown with red connectors and red text."]]