Back to Exoplayer

MediaItem.RequestMetadata (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/MediaItem.RequestMetadata.html

latest6.1 KB
Original Source

Package com.google.android.exoplayer2

Class MediaItem.RequestMetadata

  • java.lang.Object

    • com.google.android.exoplayer2.MediaItem.RequestMetadata
  • 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 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 | 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. |

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](MediaItem.RequestMetadata.html "class in com.google.android.exoplayer2")EMPTY

Empty request metadata.

- 

mediaUri

@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.

- 

searchQuery

@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.

- 

extras

@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().

- 

CREATOR

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.

Method Detail

- 

buildUpon

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.

- 

equals

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

- 

hashCode

public int hashCode()

Overrides:hashCode in class Object

- 

toBundle

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