Package com.google.android.exoplayer2
Class MediaItem.RequestMetadata
- java.lang.Object
-
- com.google.android.exoplayer2.MediaItem.RequestMetadata
-
- All Implemented Interfaces:
Bundleable
- Enclosing class:
- MediaItem
public static final class MediaItem.RequestMetadata extends Object implements Bundleable
Metadata that helps the player to understand a playback request represented by aMediaItem.This metadata is most useful for cases where playback requests are forwarded to other player instances (e.g. from a
androidx.media3.session.MediaController) and the player creating the request doesn't know the requiredMediaItem.LocalConfigurationfor playback.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMediaItem.RequestMetadata.BuilderBuilder forMediaItem.RequestMetadatainstances.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description static Bundleable.Creator<MediaItem.RequestMetadata>CREATORAn object that can restoreMediaItem.RequestMetadatafrom aBundle.static MediaItem.RequestMetadataEMPTYEmpty request metadata.BundleextrasOptional extrasBundle.UrimediaUriThe URI of the requested media, or null if not known or applicable.StringsearchQueryThe search query for the requested media, or null if not applicable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaItem.RequestMetadata.BuilderbuildUpon()Returns aMediaItem.RequestMetadata.Builderinitialized with the values of this instance.booleanequals(Object o)inthashCode()BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final MediaItem.RequestMetadata EMPTY
Empty request metadata.
-
mediaUri
@Nullable public final Uri mediaUri
The URI of the requested media, or null if not known or applicable.
-
searchQuery
@Nullable public final String searchQuery
The search query for the requested media, or null if not applicable.
-
extras
@Nullable public final Bundle extras
Optional extrasBundle.Given the complexities of checking the equality of two
Bundles, this is not considered in theequals(Object)orhashCode().
-
CREATOR
public static final Bundleable.Creator<MediaItem.RequestMetadata> CREATOR
An object that can restoreMediaItem.RequestMetadatafrom aBundle.
-
-
Method Detail
-
buildUpon
public MediaItem.RequestMetadata.Builder buildUpon()
Returns aMediaItem.RequestMetadata.Builderinitialized with the values of this instance.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-