public final class

MediaItem.AdsConfiguration.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.AdsConfiguration.Builder

Overview

Builder for MediaItem.AdsConfiguration instances.

Summary

Constructors
publicBuilder(Uri adTagUri)

Constructs a new instance.

Methods
public MediaItem.AdsConfigurationbuild()

public MediaItem.AdsConfiguration.BuildersetAdsId(java.lang.Object adsId)

Sets the ads identifier.

public MediaItem.AdsConfiguration.BuildersetAdTagUri(Uri adTagUri)

Sets the ad tag URI to load.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(Uri adTagUri)

Constructs a new instance.

Parameters:

adTagUri: The ad tag URI to load.

Methods

public MediaItem.AdsConfiguration.Builder setAdTagUri(Uri adTagUri)

Sets the ad tag URI to load.

public MediaItem.AdsConfiguration.Builder setAdsId(java.lang.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.