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 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 Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `MediaItem.RequestMetadata.Builder` | Builder for `MediaItem.RequestMetadata` instances.

    - ### 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>` | `CREATOR` | 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.

  - ### Method Summary

    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.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 extras `Bundle`.

      Given the complexities of checking the equality of two `Bundle`s, this is not considered in the `equals(Object)` or `hashCode()`.

    - #### CREATOR

          public static final Bundleable.Creator<MediaItem.RequestMetadata> CREATOR

      Object that can restore `MediaItem.RequestMetadata` from a `Bundle`.

  - ### Method Detail

    - #### buildUpon

          public MediaItem.RequestMetadata.Builder buildUpon()

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

    - #### equals

          public boolean equals​(@Nullable
                                Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toBundle

          public Bundle toBundle()

      Description copied from interface: `Bundleable`
      Returns a `Bundle` representing the information stored in this object.
      Specified by:
        `toBundle` in interface `Bundleable`