หากต้องการพูดคุยและแสดงความคิดเห็นเกี่ยวกับผลิตภัณฑ์ของเรา โปรดเข้าร่วมช่อง Discord อย่างเป็นทางการของ Ad Manager ในเซิร์ฟเวอร์ชุมชนการโฆษณาและการวัดผลของ Google
CAF DAI SDK ผสานรวมอย่างใกล้ชิดกับฟังก์ชัน CAF Ad Breaks ดั้งเดิม ดังนั้น ในกรณีส่วนใหญ่ คุณควรใช้เหตุการณ์ช่วงพักโฆษณา CAF เพื่อเรียกใช้การบันทึกหรือฟังก์ชันที่กำหนดเอง อย่างไรก็ตาม CAF DAI SDK มีเหตุการณ์เพิ่มเติมหลายรายการที่ไม่ได้มีให้ใช้งานโดยตรงผ่านช่วงพักโฆษณาของ CAF เช่น เหตุการณ์การติดตามควอร์ไทล์
ผู้เผยแพร่โฆษณาที่ต้องการความเท่าเทียมกันอย่างเต็มที่กับแพลตฟอร์มที่ใช้ IMA DAI SDK อาจต้องแนบ Listener เหตุการณ์กับ StreamManager เพื่อจัดการเหตุการณ์เพิ่มเติมเหล่านี้ หากจำเป็นต้องส่งเหตุการณ์เหล่านี้ไปยังแอปของผู้ส่งที่แนบมา เพียงส่งต่อเหตุการณ์ไปยังผู้ส่งผ่าน castContext.sendCustomMessage()
ตัวอย่างเช่น
...streamManager.addEventListener(ima.cast.dai.api.StreamEvent.Type.MIDPOINT,(event)=>{// add custom receiver handler code here, if necessaryconsole.log(event);// broadcast event to all attached senders, so they can// run custom handler code, if necessaryconstCUSTOM_CHANNEL='urn:x-cast:com.example.cast.mynamespace';castContext.sendCustomMessage(CUSTOM_CHANNEL,null,event);});castContext.start();...
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-08-21 UTC"],[],["The CAF DAI SDK utilizes CAF Ad Break events for most functions, but it also provides additional events like quartile tracking. Publishers needing full parity with the IMA DAI SDK should attach event listeners to the StreamManager to handle these extra events. To pass these events to sender apps, use `castContext.sendCustomMessage()`. An example shows how to add a listener for the `MIDPOINT` event, log it, and then broadcast it to all connected senders via a custom message channel.\n"]]