Package com.google.android.exoplayer2
Class MediaMetadata
- java.lang.Object
-
- com.google.android.exoplayer2.MediaMetadata
-
- All Implemented Interfaces:
Bundleable
public final class MediaMetadata extends Object implements Bundleable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMediaMetadata.BuilderA builder forMediaMetadatainstances.static interfaceMediaMetadata.FolderTypeThe folder type of the media item.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description CharSequencealbumArtistOptional album artist.CharSequencealbumTitleOptional album title.CharSequenceartistOptional artist.byte[]artworkDataOptional artwork data as a compressed byte array.UriartworkUriOptional artworkUri.static Bundleable.Creator<MediaMetadata>CREATORObject that can restoreMediaMetadatafrom aBundle.CharSequencedescriptionOptional description.CharSequencedisplayTitleOptional display title.static MediaMetadataEMPTYEmptyMediaMetadata.BundleextrasOptional extrasBundle.static intFOLDER_TYPE_ALBUMSType for a folder containing media categorized by album.static intFOLDER_TYPE_ARTISTSType for a folder containing media categorized by artist.static intFOLDER_TYPE_GENRESType for a folder containing media categorized by genre.static intFOLDER_TYPE_MIXEDType for a folder containing media of mixed types.static intFOLDER_TYPE_PLAYLISTSType for a folder containing a playlist.static intFOLDER_TYPE_TITLESType for a folder containing only playable media.static intFOLDER_TYPE_YEARSType for a folder containing media categorized by year.IntegerfolderTypeOptionalMediaMetadata.FolderType.BooleanisPlayableOptional boolean for media playability.UrimediaUriOptional mediaUri.RatingoverallRatingOptional overallRating.CharSequencesubtitleOptional subtitle.CharSequencetitleOptional title.IntegertotalTrackCountOptional total number of tracks.IntegertrackNumberOptional track number.RatinguserRatingOptional userRating.IntegeryearOptional year.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaMetadata.BuilderbuildUpon()Returns a newMediaMetadata.Builderinstance with the currentMediaMetadatafields.booleanequals(Object obj)inthashCode()BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
FOLDER_TYPE_MIXED
public static final int FOLDER_TYPE_MIXED
Type for a folder containing media of mixed types.- See Also:
- Constant Field Values
-
FOLDER_TYPE_TITLES
public static final int FOLDER_TYPE_TITLES
Type for a folder containing only playable media.- See Also:
- Constant Field Values
-
FOLDER_TYPE_ALBUMS
public static final int FOLDER_TYPE_ALBUMS
Type for a folder containing media categorized by album.- See Also:
- Constant Field Values
-
FOLDER_TYPE_ARTISTS
public static final int FOLDER_TYPE_ARTISTS
Type for a folder containing media categorized by artist.- See Also:
- Constant Field Values
-
FOLDER_TYPE_GENRES
public static final int FOLDER_TYPE_GENRES
Type for a folder containing media categorized by genre.- See Also:
- Constant Field Values
-
FOLDER_TYPE_PLAYLISTS
public static final int FOLDER_TYPE_PLAYLISTS
Type for a folder containing a playlist.- See Also:
- Constant Field Values
-
FOLDER_TYPE_YEARS
public static final int FOLDER_TYPE_YEARS
Type for a folder containing media categorized by year.- See Also:
- Constant Field Values
-
EMPTY
public static final MediaMetadata EMPTY
EmptyMediaMetadata.
-
title
@Nullable public final CharSequence title
Optional title.
-
artist
@Nullable public final CharSequence artist
Optional artist.
-
albumTitle
@Nullable public final CharSequence albumTitle
Optional album title.
-
albumArtist
@Nullable public final CharSequence albumArtist
Optional album artist.
-
displayTitle
@Nullable public final CharSequence displayTitle
Optional display title.
-
subtitle
@Nullable public final CharSequence subtitle
Optional subtitle.This is the secondary title of the media, unrelated to closed captions.
-
description
@Nullable public final CharSequence description
Optional description.
-
artworkData
@Nullable public final byte[] artworkData
Optional artwork data as a compressed byte array.
-
trackNumber
@Nullable public final Integer trackNumber
Optional track number.
-
totalTrackCount
@Nullable public final Integer totalTrackCount
Optional total number of tracks.
-
folderType
@Nullable @FolderType public final Integer folderType
OptionalMediaMetadata.FolderType.
-
isPlayable
@Nullable public final Boolean isPlayable
Optional boolean for media playability.
-
year
@Nullable public final Integer year
Optional year.
-
extras
@Nullable public final Bundle extras
Optional extrasBundle.Given the complexities of checking the equality of two
Bundles, this is not considered in theequals(Object)orhashCode().
-
CREATOR
public static final Bundleable.Creator<MediaMetadata> CREATOR
Object that can restoreMediaMetadatafrom aBundle.
-
-
Method Detail
-
buildUpon
public MediaMetadata.Builder buildUpon()
Returns a newMediaMetadata.Builderinstance with the currentMediaMetadatafields.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-