Back to Exoplayer

MediaItem.AdsConfiguration.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/MediaItem.AdsConfiguration.Builder.html

latest2.8 KB
Original Source

Package com.google.android.exoplayer2

Class MediaItem.AdsConfiguration.Builder


public static final classMediaItem.AdsConfiguration.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

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](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")adTagUri)

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

Method Detail

- 

setAdTagUri

@CanIgnoreReturnValue
public[MediaItem.AdsConfiguration.Builder](MediaItem.AdsConfiguration.Builder.html "class in com.google.android.exoplayer2")setAdTagUri​([Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")adTagUri)

Sets the ad tag URI to load.

- 

setAdsId

@CanIgnoreReturnValue
public[MediaItem.AdsConfiguration.Builder](MediaItem.AdsConfiguration.Builder.html "class in com.google.android.exoplayer2")setAdsId​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")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](MediaItem.AdsConfiguration.html "class in com.google.android.exoplayer2")build()