---
metadata:
  - name: generator
    content: Diplodoc Platform v5.57.3
alternate:
  - https://boost.yandex.com/doc/en/ad-monetization/dev/ios/instream.md
  - https://boost.yandex.com/doc/ru/ad-monetization/dev/ios/instream.md
  - href: en/ad-monetization/dev/ios/instream.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://boost.yandex.com/doc/en/llms.txt

# InStream ads

<!-- source: en/ad-monetization/dev/_includes/instream-src.md -->
InStream is an ad format that lets you monetize your app by serving ads while video content is playing. An InStream ad consists of a scenario with multiple video blocks.

The type of video unit in an InStream scenario determines how the video ad should be played relative to the main video content.
<!-- endsource: en/ad-monetization/dev/_includes/instream-src.md -->


## About InStream

<!-- source: en/ad-monetization/dev/_includes/instream-src.md -->
To set up an InStream scenario, create a [video resource](https://yandex.com/support2/partner/en/video/resource#create-resource) in the Boost interface. Once created, the video resource is assigned a unique identifier (Page ID). This ID should be used in the Mobile Ads SDK.

To increase ad revenue, you can set up playing multiple ads within a single ad placement: an AdPod. You can set up the AdPod for an ad placement in the Boost interface.

Types of video units supported by the Mobile Ads SDK:
- Pre-roll: A video ad is played before the main content.
- Mid-roll: A video ad is played at a certain time within the main content.
- Post-roll: A video ad is played after the main content.
- Pause-roll: A video ad is played when the user clicks the pause button.
- In-roll: A video ad is played anywhere in the video when a certain point is reached.
<!-- endsource: en/ad-monetization/dev/_includes/instream-src.md -->



## API for working with InStream ads

You can use the [advanced](https://boost.yandex.com/doc/en/ad-monetization/dev/ios/instream-advanced.md) InStream ad integration API to support playback for all types of ad breaks and implement a custom player. InStream ads consist of video ads that are played automatically and manually.

Use the InstreamAdBinder API to automatically play Pre-roll, Mid-roll, and Post-roll ad breaks. Use the InstreamAdBreak API to trigger ad breaks manually.

{% note info %}

You can use the InstreamAdBinder API and the InstreamAdBreak API concurrently under specific conditions:

1. Use different instances of the ad player.
2. Don't trigger playback using the InstreamAdBreak API while the main video is paused via the InstreamAdBinder API.
3. When using `InstreamAd` with the InstreamAdBreak API, use only `InstreamAdBreakType.inroll` or `InstreamAdBreakType.pauseroll` ad breaks. InstreamAdBinder automatically handles rendering for all other types.

{% endnote %}
