ดูข้อมูลเกี่ยวกับสถาปัตยกรรม SDK
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คู่มือนี้จะกล่าวถึงภาพรวมของวงจร SDK และการโต้ตอบระหว่างโปรแกรมเล่นสตรีมวิดีโอ, IMA DAI SDK และเซิร์ฟเวอร์โฆษณา
การโต้ตอบพื้นฐาน
แผนภาพต่อไปนี้แสดงและกำกับการโต้ตอบระหว่างโปรแกรมเล่นวิดีโอ IMA DAI SDK และ Ad Manager 360

หน้าเว็บหรือแอปโหลด IMA DAI SDK ผ่าน
- แท็กสคริปต์ที่ฝังสําหรับ HTML5
- แอปที่มาพร้อมเครื่อง Android, Google Cast, iOS, tvOS หรือ Roku
IMA DAI SDK จะขอสตรีม VOD หรือสตรีมแบบสดจาก Google Ad Manager 360
Ad Manager 360 จะตอบกลับด้วยสตรีมวิดีโอที่มีช่วงพักโฆษณาแทรกอยู่
IMA DAI SDK จะแยกวิเคราะห์การตอบกลับ ระบุประเภทสื่อที่ถูกต้องตามสภาพแวดล้อม และส่งสตรีมวิดีโอ (และโฆษณาที่แสดงร่วมกัน หากจำเป็น) ไปยังหน้าเว็บหรือแอป
วิดีโอเพลเยอร์จะเจรจารายละเอียดการเล่นกับ IMA DAI SDK และเล่นโฆษณา
IMA SDK จะเริ่มใช้คำสั่ง ping การแสดงผลและเหตุการณ์การติดตามตามที่จำเป็น
อายุการใช้งาน
แผนภาพนี้แสดงวงจรชีวิตของ IMA DAI SDK โดยสมบูรณ์ เครื่องมือสร้างและวิธีการ
การโทรจะไฮไลต์ด้วยสีน้ำเงิน ไฮไลต์กิจกรรมด้วยสีแดง และข้อผิดพลาด
เงื่อนไขจะแสดงด้วยเครื่องมือเชื่อมต่อสีแดงและข้อความสีแดง

เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-21 UTC
[null,null,["อัปเดตล่าสุด 2025-08-21 UTC"],[[["\u003cp\u003eThe IMA DAI SDK facilitates communication between your video player and an ad server (like Google Ad Manager 360) to seamlessly integrate ads into video content.\u003c/p\u003e\n"],["\u003cp\u003eThe SDK handles requesting the video stream, parsing ad breaks, and delivering the content to the player for playback, including companion ads.\u003c/p\u003e\n"],["\u003cp\u003eThroughout the process, the IMA SDK manages playback details, tracks ad impressions, and sends necessary event updates for monitoring and analysis.\u003c/p\u003e\n"],["\u003cp\u003eThe lifecycle of the SDK involves initialization, stream requests, ad playback, and event handling, with potential error scenarios addressed.\u003c/p\u003e\n"]]],[],null,["# Learn the SDK architecture\n\nThis guide provides an overview of the SDK lifecycle and the interactions\nbetween your video stream player, the IMA DAI SDK, and an ad server.\n\nBasic interactions\n------------------\n\nThe following diagram illustrates and annotates the interactions between\nyour video player, the IMA DAI SDK, and Ad Manager 360.\n\n1. The web page or app loads the IMA DAI SDK via:\n\n - an embedded script tag for HTML5\n - a native app for Android, Google Cast, iOS, tvOS, or Roku\n2. The IMA DAI SDK requests either a VOD stream or live stream from Google Ad\n Manager 360.\n\n3. Ad Manager 360 responds with the video stream that includes inserted ad\n breaks.\n\n4. The IMA DAI SDK parses the response, determines the correct media type based\n on environment, and delivers the video stream (and\n companion ads if needed) to the web page or app.\n\n5. The video player negotiates the playback details with the IMA DAI SDK and\n plays the ads.\n\n6. The IMA SDK fires an impression ping and tracking events, as needed.\n\nLifecycle\n---------\n\nThis diagram shows the full lifecycle of the IMA DAI 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."]]