-(void)setUpAdsLoader{...IMASettingssettings=[[IMASettingsalloc]init];// Tell the SDK that you want to control ad break playback.settings.autoPlayAdBreaks=NO;self.adsLoader=[[IMAAdsLoaderalloc]initWithSettings:settings];...}-(void)adsManager:(IMAAdsManager*)adsManagerdidReceiveAdEvent:(IMAAdEvent*)event{...switch(event.type){// Listen for the AD_BREAK_READY eventcasekIMAAdEvent_AD_BREAK_READY:// Tell the SDK to play ads when you're ready. To skip this ad break,// simply return from this handler without calling [adsManager start].[adsManagerstart];break;...}}
คำถามที่พบบ่อย
จำเป็นต้องใช้สำหรับการติดตั้งใช้งาน IMA SDK ไหม
ไม่ใช่อย่างแน่นอน ตัวเลือกนี้ใช้ได้กับผู้เผยแพร่โฆษณาที่ไม่ต้องการให้ IMA SDK เล่นโฆษณาตอนกลางโดยอัตโนมัติเมื่อมีการกําหนดเวลาตามกฎโฆษณาหรือการตอบกลับ VMAP
[[["เข้าใจง่าย","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-06-24 UTC"],[[["This guide explains how to manually control ad break playback timing within the IMA SDK for iOS apps, preventing automatic mid-roll playback."],["By implementing manual ad break playback, developers can trigger mid-roll ads using the `AD_BREAK_READY` event and the `start` method."],["This feature is optional and intended for publishers seeking greater control over ad playback timing, requiring code modifications to the IMA SDK setup and event handling."],["Manual ad break playback involves three steps: disabling automatic ad breaks, listening for the `AD_BREAK_READY` event, and initiating ad playback when desired."]]],[]]