Pelajari arsitektur SDK
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Pilih platform:
HTML5
Android
iOS
tvOS
Panduan ini memberikan ringkasan siklus proses SDK dan interaksi
antara pemutar video, IMA SDK, dan server iklan.
Interaksi dasar
Diagram berikut menggambarkan dan memberi anotasi pada interaksi antara
pemutar video, IMA SDK, dan server iklan. Server iklan dapat menggunakan
Ad Manager, AdSense untuk Video (AFV), atau Ad Exchange (AdX).

Halaman web atau aplikasi memuat IMA SDK menggunakan:
- tag skrip tersemat untuk HTML5
- aplikasi untuk Android, Google Cast, iOS, atau tvOS
IMA SDK meminta Respons VAST untuk Unit Iklan tertentu di server iklan. Server iklan yang dipanggil, yang dapat berupa Ad Manager versus AFV atau AdX, ditentukan oleh URL tag iklan.
Server iklan memilih iklan terbaik dan mengirimkan respons VAST ke IMA SDK.
Iklan dipilih menggunakan salah satu metode berikut:
- Filter Unit Iklan Ad Manager untuk kandidat Item baris
- AdSense atau Ad Exchange menjalankan lelang
IMA SDK mengurai respons VAST, menentukan jenis media yang benar berdasarkan lingkungan, dan menayangkan materi iklan video inline (dan iklan pengiring jika diperlukan) ke halaman web atau aplikasi.
Pemutar video menegosiasikan detail pemutaran dengan IMA SDK dan memutar iklan.
IMA SDK memicu ping tayangan iklan dan peristiwa pelacakan VAST, sesuai kebutuhan.
Lifecycle
Diagram ini menunjukkan siklus proses lengkap IMA SDK. Panggilan konstruktor dan metode
ditandai dengan warna biru, peristiwa ditandai dengan warna merah, dan kondisi
error ditampilkan dengan penghubung merah dan teks merah.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-31 UTC.
[null,null,["Terakhir diperbarui pada 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 display ads within the video player.\u003c/p\u003e\n"],["\u003cp\u003eThe IMA SDK handles playback negotiation with the video player and manages ad impressions and tracking events for accurate reporting.\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."]]