Select platform: [Android](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/manual_ad_playback.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/manual_ad_playback.md.txt "View this page for the iOS platform docs.")

This guide is intended for users who want manual control over ad break playback timing. In a default implementation, the SDK automatically plays mid-rolls at their scheduled time. Some developers may want to prevent the SDK from playing these ad breaks automatically. By implementing manual ad break playback, the SDK fires an `AD_BREAK_READY` event when a mid-roll has been loaded, and wait on you to start the break's playback.

## Prerequisites

<br />

- iOS application with the IMA SDK implemented.

<br />

## Helpful primers

If you still need to implement the IMA SDK in your app, check out our [Get Started guide](https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side).

## Configuring Manual Ad Break Playback

Configuring manual ad break playback takes three steps:  

1. Tell the SDK you want to control ad break playback.
2. Listen for the AD_BREAK_READY event.
3. Tell the SDK to play ads when you're ready.

The snippet below shows the modifications required on the [Advanced Example](https://github.com/googleads/googleads-ima-ios/tree/master/Objective-C/AdvancedExample) to implement manual ad break playback:

```
- (void)setUpAdsLoader {
  ...
  IMASettings settings = [[IMASettings alloc] init];
  // Tell the SDK that you want to control ad break playback.
  settings.autoPlayAdBreaks = NO;
  self.adsLoader = [[IMAAdsLoader alloc] initWithSettings:settings];
  ...
}

- (void)adsManager:(IMAAdsManager *)adsManager didReceiveAdEvent:(IMAAdEvent *)event {
  ...
  switch (event.type) {
    // Listen for the AD_BREAK_READY event
    case kIMAAdEvent_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].
      [adsManager start];
      break;
    ...
  }
}
```

## FAQ

Is this required for an IMA SDK implementation?
:   Absolutely not! This is only offered for publishers who do not want the IMA SDK to automatically play mid-roll ads when they are scheduled by your ad rules or VMAP response.