Package com.google.android.exoplayer2

## Class MediaItem.AdsConfiguration.Builder

- java.lang.Object
- - com.google.android.exoplayer2.MediaItem.AdsConfiguration.Builder

- Enclosing class:
    MediaItem.AdsConfiguration

      public static final class MediaItem.AdsConfiguration.Builder
      extends Object

  Builder for `MediaItem.AdsConfiguration` instances.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder​(Uri adTagUri)` | Constructs a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `MediaItem.AdsConfiguration` | `build()` |
    `MediaItem.AdsConfiguration.Builder` | `setAdsId​(Object adsId)` | Sets the ads identifier.
    `MediaItem.AdsConfiguration.Builder` | `setAdTagUri​(Uri adTagUri)` | Sets the ad tag URI to load.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder​(Uri adTagUri)

      Constructs a new instance.
      Parameters:
        `adTagUri` - The ad tag URI to load.

  - ### Method Detail

    - #### setAdTagUri

          @CanIgnoreReturnValue
          public MediaItem.AdsConfiguration.Builder setAdTagUri​(Uri adTagUri)

      Sets the ad tag URI to load.

    - #### setAdsId

          @CanIgnoreReturnValue
          public MediaItem.AdsConfiguration.Builder setAdsId​(@Nullable
                                                             Object adsId)

      Sets the ads identifier.

      See details on `MediaItem.AdsConfiguration.adsId` for how the ads identifier is used and how it's calculated if not explicitly set.

    - #### build

          public MediaItem.AdsConfiguration build()