---
metadata:
  - name: generator
    content: Diplodoc Platform v5.34.3
alternate:
  - https://yandex.ru/dev/video-sdk/doc/en/sdk-html5/AdConfig-interface.md
  - https://yandex.ru/dev/video-sdk/doc/ru/sdk-html5/AdConfig-interface.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/video-sdk/doc/en/llms.txt

# AdConfig

Interface with ad launch parameters.

[Properties](#properties)

## Properties {#properties}

| Name                            | Type                                        | Mandatory    | Description                                                                                                                                                                                      |
|:-------------------------------|:-------------------------------------------|:------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **YAN integration parameters** |                                            |              |                                                                                                                                                                                                  |
| `partnerId`                    | number                                     |      ✅       | Partner ID that can be found in the Partner Interface.                                                                                                                                            |
| `category`                     | number                                     |      ✅       | Partner site section category.                                                                                                                                                                   |
| `impId`                        | number                                     |      ❌       | Ad unit ID (AdBreak). If omitted, a preroll unit is used.                                                                                                                                        |
| `partnerStatId`                | string                                     |      ❌       | Sample ID. A number between 1 and 1000000000.                                                                                                                                                    |
| **Adfox integration parameters**|                                            |              |                                                                                                                                                                                                  |
| `adFoxParameters`              | AdFoxParameters      |      ✅       | Adfox integration parameters.                                                                                                                                                                    |
| **General parameters**         |                                            |              |                                                                                                                                                                                                  |
| `videoContentUrl`              | string                                     |      ✅       | URL of the video content where In-Stream ads are played (if the video player is embedded via an iframe). In other cases, the value may match `targetRef`.                                                                                                                                        |
| `videoContentDuration`         | number or `'infinity'` string                       |      ✅       | Video content duration in seconds. `'infinity'` string value is required for live streams and broadcasts.                                                                                                       |
| `targetRef`                    | string                                     |      ✅       | URL of the page where In-Stream ads are played.                                                                                                                                                  |
| `adBreakType`                  | [AdBreakType](ADType-string.md)            |      ❌       | Ad unit type. Specified if no additional loading of ad parameters from the YAN is required.                                                                                                      |
| `desiredBitrate`               | number                                     |      ❌       | Recommended bitrate in kbps.                                                                                                                                                                     |
| `preferableAdSize`             | [PixelSize](PixelSize.md)                  |      ❌       | Preferred ad size.                                                                                                                                                                               |
| `trackingEvents`               | [TrackingEvents](TrackingEvents-string.md) |      ❌       | Object with VAST event names.                                                                                                                                                                    |
| `vast`                         | string                                     |      ❌       | XML-VAST document (string).                                                                                                                                                                      |
| `vastUrl`                      | string                                     |      ❌       | Link to be used to load VAST for serving ads.                                                                                                                                                    |
| `vmapLoadTimeout`              | milliseconds                               |      ❌       | Maximum allowed VMAP loading time.                                                                                                                                                               |
