MediaItem.RequestMetadata

class MediaItem.RequestMetadata : Bundleable


Metadata that helps the player to understand a playback request represented by a .

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 LocalConfiguration for playback.

Summary

Nested types

Builder for RequestMetadata instances.

Constants

const Bundleable.Creator<MediaItem.RequestMetadata!>!

This property is deprecated.

Use fromBundle instead.

const MediaItem.RequestMetadata!

Empty request metadata.

Public functions

MediaItem.RequestMetadata.Builder!

Returns a Builder initialized with the values of this instance.

Boolean
equals(o: Any?)
java-static MediaItem.RequestMetadata!

Restores a RequestMetadata from a Bundle.

Int
Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

Bundle?

Optional extras Bundle.

Uri?

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

String?

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

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<MediaItem.RequestMetadata!>!

An object that can restore RequestMetadata from a Bundle.

EMPTY

const val EMPTYMediaItem.RequestMetadata!

Empty request metadata.

Public functions

buildUpon

fun buildUpon(): MediaItem.RequestMetadata.Builder!

Returns a Builder initialized with the values of this instance.

equals

fun equals(o: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): MediaItem.RequestMetadata!

Restores a RequestMetadata from a Bundle.

hashCode

fun hashCode(): Int

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

extras

val extrasBundle?

Optional extras Bundle.

Given the complexities of checking the equality of two Bundles, the contents of these extras are not considered in the equals or hashCode.

mediaUri

val mediaUriUri?

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

searchQuery

val searchQueryString?

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