# androidx.media3.exoplayer.source.ads

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsLoader` | Interface for loaders of ads, which can be used with `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsMediaSource`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsLoader.EventListener` | Listener for ads loader events. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsLoader.Provider` | Provides `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsLoader` instances for media items that have `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LocalConfiguration#adsConfiguration()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/ServerSideAdInsertionMediaSource.AdPlaybackStateUpdater` | Receives ad playback state update requests when the `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` of the content media source has changed. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdTimeline` | A custom `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` for sources that have `https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState` split among multiple periods. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsMediaSource` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource` that inserts ads linearly into a provided content media source. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/ServerSideAdInsertionMediaSource` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource` for server-side inserted ad breaks. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/ServerSideAdInsertionUtil` | A static utility class with methods to work with server-side inserted ads. |

## Exceptions

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsMediaSource.AdLoadException` | Wrapper for exceptions that occur while loading ads, which are notified via `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSourceEventListener#onLoadError(int,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId,androidx.media3.exoplayer.source.LoadEventInfo,androidx.media3.exoplayer.source.MediaLoadData,java.io.IOException,boolean)`. |

## Annotations

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ads/AdsMediaSource.AdLoadException.Type` | Types of ad load exceptions. |