docs/doc/reference/com/google/android/exoplayer2/MediaItem.RequestMetadata.html
Package com.google.android.exoplayer2
All Implemented Interfaces:BundleableEnclosing class:MediaItem
public static final classMediaItem.RequestMetadataextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")
Metadata that helps the player to understand a playback request represented by a MediaItem.
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 required MediaItem.LocalConfiguration for playback.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | MediaItem.RequestMetadata.Builder |
Builder for MediaItem.RequestMetadata instances.
|
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<MediaItem.RequestMetadata> | CREATOR |
An object that can restore MediaItem.RequestMetadata from a Bundle.
|
| static MediaItem.RequestMetadata | EMPTY |
Empty request metadata.
|
| Bundle | extras |
Optional extras Bundle.
|
| Uri | mediaUri |
The URI of the requested media, or null if not known or applicable.
|
| String | searchQuery |
The search query for the requested media, or null if not applicable.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| MediaItem.RequestMetadata.Builder | buildUpon() |
Returns a MediaItem.RequestMetadata.Builder initialized with the values of this instance.
|
| boolean | equals(Object o) | |
| int | hashCode() | |
| Bundle | toBundle() |
Returns a Bundle representing the information stored in this object.
|
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public static final[MediaItem.RequestMetadata](MediaItem.RequestMetadata.html "class in com.google.android.exoplayer2")EMPTY
Empty request metadata.
-
@Nullable
public final[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")mediaUri
The URI of the requested media, or null if not known or applicable.
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")searchQuery
The search query for the requested media, or null if not applicable.
-
@Nullable
public final[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")extras
Optional extras Bundle.
Given the complexities of checking the equality of two Bundles, this is not considered in the equals(Object) or hashCode().
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[MediaItem.RequestMetadata](MediaItem.RequestMetadata.html "class in com.google.android.exoplayer2")> CREATOR
An object that can restore MediaItem.RequestMetadata from a Bundle.
-
public[MediaItem.RequestMetadata.Builder](MediaItem.RequestMetadata.Builder.html "class in com.google.android.exoplayer2")buildUpon()
Returns a MediaItem.RequestMetadata.Builder initialized with the values of this instance.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)
Overrides:equals in class Object
-
public int hashCode()
Overrides:hashCode in class Object
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable