-(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-04-08 (世界標準時間)。"],[[["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."]]],[]]