MediaMetadata


public final class MediaMetadata


Metadata of a MediaItem, playlist, or a combination of multiple sources of .

Summary

Nested types

public final class MediaMetadata.Builder

A builder for MediaMetadata instances.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(value = )
public annotation MediaMetadata.FolderType

This annotation is deprecated.

Use isBrowsable to indicate if an item is a browsable folder and use mediaType to indicate the type of the folder.

The type of content described by the media item.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(value = )
public annotation MediaMetadata.PictureType

The picture type of the artwork.

Constants

static final MediaMetadata

Empty MediaMetadata.

static final int

This field is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_ALBUMS instead.

static final int

This field is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_ARTISTS instead.

static final int

This field is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_GENRES instead.

static final int

This field is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_MIXED instead.

static final int

This field is deprecated.

Use isBrowsable set to false instead.

static final int

This field is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_PLAYLISTS instead.

static final int

This field is deprecated.

Use isBrowsable set to true instead.

static final int

This field is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_YEARS instead.

static final int

MediaType for a group of items (e.g., music) belonging to an album.

static final int

MediaType for a group of items (e.g., music) from the same artist.

static final int

MediaType for a group of items forming an audio book.

static final int

MediaType for an audio book chapter.

static final int

MediaType for a folder containing albums.

static final int

MediaType for a folder containing artists.

static final int

MediaType for a folder containing audio books.

static final int

MediaType for a folder containing genres.

static final int

MediaType for a folder with mixed or undetermined content.

static final int

MediaType for a folder containing movies.

static final int

MediaType for a folder containing news.

static final int

MediaType for a folder containing playlists.

static final int

MediaType for a folder containing podcasts.

static final int

MediaType for a folder containing radio stations.

static final int

MediaType for a folder containing movie trailers.

static final int

MediaType for a folder containing TV channels.

static final int

MediaType for a folder containing TV series.

static final int

MediaType for a folder containing TV shows.

static final int

MediaType for a folder containing videos.

static final int

MediaType for a folder containing years.

static final int

MediaType for a group of items (e.g., music) of the same genre.

static final int

Media of undetermined type or a mix of multiple media types.

static final int

MediaType for a movie.

static final int

MediaType for music.

static final int

MediaType for news.

static final int

MediaType for a group of items (e.g., music) forming a playlist.

static final int

MediaType for a group of items belonging to a podcast.

static final int

MediaType for a podcast episode.

static final int

MediaType for a radio station.

static final int

MediaType for a movie trailer.

static final int

MediaType for a group of items that are part of a TV channel.

static final int

MediaType for a group of items that are part of a TV series.

static final int

MediaType for a group of items that are part of a TV series.

static final int

MediaType for a TV show.

static final int

MediaType for a video.

static final int

MediaType for a group of items (e.g., music) from the same year.

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int

Public fields

final @Nullable CharSequence

Optional album artist.

final @Nullable CharSequence

Optional album title.

final @Nullable CharSequence

Optional artist.

final @Nullable byte[]

Optional artwork data as a compressed byte array.

final @Nullable @MediaMetadata.PictureType Integer

Optional PictureType of the artwork data.

final @Nullable Uri

Optional artwork Uri.

final @Nullable CharSequence

Optional compilation.

final @Nullable CharSequence

Optional composer.

final @Nullable CharSequence

Optional conductor.

final @Nullable CharSequence

Optional description.

final @Nullable Integer

Optional disc number.

final @Nullable CharSequence

Optional display title.

final @Nullable Long

Optional duration, non-negative and in milliseconds.

final @Nullable Bundle

Optional extras Bundle.

final @Nullable @MediaMetadata.FolderType Integer

This field is deprecated.

Use isBrowsable to indicate if an item is a browsable folder and use mediaType to indicate the type of the folder.

final @Nullable CharSequence

Optional genre.

final @Nullable Boolean

Optional boolean to indicate that the media is a browsable folder.

final @Nullable Boolean

Optional boolean to indicate that the media is playable.

final @Nullable @MediaMetadata.MediaType Integer

Optional MediaType.

final @Nullable Rating

Optional overall Rating.

final @Nullable Integer

Optional day of the recording date.

final @Nullable Integer

Optional month of the recording date.

final @Nullable Integer

Optional year of the recording date.

final @Nullable Integer

Optional day of the release date.

final @Nullable Integer

Optional month of the release date.

final @Nullable Integer

Optional year of the release date.

final @Nullable CharSequence

Optional name of the station streaming the media.

final @Nullable CharSequence

Optional subtitle.

final ImmutableList<String>

The IDs of the supported commands of this media item (see for instance CommandButton.sessionCommand.customAction of the Media3 session module).

final @Nullable CharSequence

Optional title.

final @Nullable Integer

Optional total number of discs.

final @Nullable Integer

Optional total number of tracks.

final @Nullable Integer

Optional track number.

final @Nullable Rating

Optional user Rating.

final @Nullable CharSequence

Optional writer.

final @Nullable Integer

This field is deprecated.

Use recordingYear instead.

Public methods

MediaMetadata.Builder

Returns a new Builder instance with the current MediaMetadata fields.

boolean

Note: Equality checking does not consider extras.

static MediaMetadata

Restores a MediaMetadata from a Bundle.

int
Bundle

Constants

EMPTY

public static final MediaMetadata EMPTY

Empty MediaMetadata.</