public final class

MediaItem.AdsConfiguration

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.AdsConfiguration

Overview

Configuration for playing back linear ads with a media item.

Summary

Fields
public final java.lang.ObjectadsId

An opaque identifier for ad playback state associated with this item, or null if the combination of the media ID and ad tag URI should be used as the ads identifier.

public final UriadTagUri

The ad tag URI to load.

Methods
public MediaItem.AdsConfiguration.BuilderbuildUpon()

Returns a MediaItem.AdsConfiguration.Builder initialized with the values of this instance.

public booleanequals(java.lang.Object obj)

public inthashCode()

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

Fields

public final Uri adTagUri

The ad tag URI to load.

public final java.lang.Object adsId

An opaque identifier for ad playback state associated with this item, or null if the combination of the media ID and ad tag URI should be used as the ads identifier.

Media items in the playlist that have the same ads identifier and ads loader share the same ad playback state. To resume ad playback when recreating the playlist on returning from the background, pass the same ads identifiers to the player.

Methods

Returns a MediaItem.AdsConfiguration.Builder initialized with the values of this instance.

public boolean equals(java.lang.Object obj)

public int hashCode()