Package com.google.android.exoplayer2
Class MediaItem.AdsConfiguration
- java.lang.Object
-
- com.google.android.exoplayer2.MediaItem.AdsConfiguration
-
- All Implemented Interfaces:
Bundleable
- Enclosing class:
- MediaItem
public static final class MediaItem.AdsConfiguration extends Object implements Bundleable
Configuration for playing back linear ads with a media item.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMediaItem.AdsConfiguration.BuilderBuilder forMediaItem.AdsConfigurationinstances.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description ObjectadsIdAn opaque identifier for ad playback state associated with this item, ornullif the combination of themedia IDandad tag URIshould be used as the ads identifier.UriadTagUriThe ad tag URI to load.static Bundleable.Creator<MediaItem.AdsConfiguration>CREATORAn object that can restoreMediaItem.AdsConfigurationfrom aBundle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaItem.AdsConfiguration.BuilderbuildUpon()Returns aMediaItem.AdsConfiguration.Builderinitialized with the values of this instance.booleanequals(Object obj)inthashCode()BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
adTagUri
public final Uri adTagUri
The ad tag URI to load.
-
adsId
@Nullable public final Object adsId
An opaque identifier for ad playback state associated with this item, ornullif the combination of themedia IDandad tag URIshould 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.
-
CREATOR
public static final Bundleable.Creator<MediaItem.AdsConfiguration> CREATOR
An object that can restoreMediaItem.AdsConfigurationfrom aBundle.The
adsIdof a restored instance will always benull.
-
-
Method Detail
-
buildUpon
public MediaItem.AdsConfiguration.Builder buildUpon()
Returns aMediaItem.AdsConfiguration.Builderinitialized with the values of this instance.
-
-