public final class

MediaItem.RequestMetadata

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.RequestMetadata

Overview

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.

Summary

Fields
public static final MediaItem.RequestMetadataEMPTY

Empty request metadata.

public final Bundleextras

Optional extras .

public final UrimediaUri

The URI of the requested media, or null if not known or applicable.

public final java.lang.StringsearchQuery

The search query for the requested media, or null if not applicable.

Methods
public MediaItem.RequestMetadata.BuilderbuildUpon()

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

public booleanequals(java.lang.Object o)

public static MediaItem.RequestMetadatafromBundle(Bundle bundle)

Restores a RequestMetadata from a .

public inthashCode()

public BundletoBundle()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Fields

public static final MediaItem.RequestMetadata EMPTY

Empty request metadata.

public final Uri mediaUri

The URI of the requested media, or null if not known or applicable.

public final java.lang.String searchQuery

The search query for the requested media, or null if not applicable.

public final Bundle extras

Optional extras .

Given the complexities of checking the equality of two instances, the contents of these extras are not considered in the MediaItem.RequestMetadata.equals(Object) or MediaItem.RequestMetadata.hashCode() implementation.

Methods

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

public boolean equals(java.lang.Object o)

public int hashCode()

public Bundle toBundle()

public static MediaItem.RequestMetadata fromBundle(Bundle bundle)

Restores a RequestMetadata from a .