التعرّف على بنية حزمة تطوير البرامج (SDK)
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
اختيار النظام الأساسي:
HTML5
Android
iOS
tvOS
يقدّم هذا الدليل نظرة عامة على دورة حياة حزمة تطوير البرامج (SDK) والتفاعلات بين مشغّل الفيديو و"حزمة تطوير البرامج لإعلانات الوسائط التفاعلية" وخادم الإعلانات.
التفاعلات الأساسية
يوضّح الرسم البياني التالي التفاعلات بين مشغّل الفيديو وحزمة IMA SDK وخادم الإعلانات، مع إضافة تعليقات توضيحية. يمكن لخادم الإعلانات استخدام "مدير إعلانات Google" أو "AdSense للفيديو" (AFV) أو Ad Exchange (AdX).

تحمّل صفحة الويب أو التطبيق حزمة تطوير البرامج لإعلانات الوسائط التفاعلية باستخدام:
- علامة نص برمجي مضمّنة لـ HTML5
- تطبيق متوافق مع Android أو Google Cast أو iOS أو tvOS
تطلب حزمة تطوير البرامج (SDK) لإعلانات الوسائط التفاعلية استجابة VAST للوحدة الإعلانية المحدّدة على خادم الإعلانات. يتم تحديد خادم الإعلانات الذي تمّ طلبه، والذي يمكن أن يكون "مدير إعلانات Google" مقابل "الفيديو على AdSense" أو AdX، من خلال عنوان URL لعلامة الإعلان.
يختار خادم الإعلانات أفضل إعلان ويرسل استجابة VAST إلى حزمة تطوير البرامج (SDK) لإعلانات الوسائط التفاعلية (IMA).
يتم اختيار الإعلانات باستخدام إحدى الطرق التالية:
- فلاتر الوحدة الإعلانية في "مدير إعلانات Google" لعناصر الإعلان المرشّحة
- إجراء مزاد من خلال AdSense أو Ad Exchange
تحلّل "حزمة تطوير البرامج لإعلانات الوسائط التفاعلية" استجابة VAST، وتحدّد نوع الوسائط الصحيح استنادًا إلى البيئة، وتقدّم تصميم الإعلان على الفيديو المضمّن (والإعلانات المصاحبة إذا لزم الأمر) إلى صفحة الويب أو التطبيق.
يتفاوض مشغّل الفيديو على تفاصيل التشغيل مع حزمة IMA SDK ويشغّل الإعلانات.
تُرسِل حزمة تطوير البرامج (SDK) لواجهة IMA طلب ping لمرّة الظهور وأحداث تتبُّع VAST، حسب الحاجة.
مراحل النشاط
يوضّح هذا المخطّط البياني دورة الحياة الكاملة لحزمة تطوير البرامج (SDK) لإعلانات الوسائط التفاعلية. يتم تمييز عمليات استدعاء الدوال الإنشائية والدوال باللون الأزرق، ويتم تمييز الأحداث باللون الأحمر، ويتم عرض حالات الخطأ باستخدام موصلات حمراء ونص أحمر.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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."]]