MediaMetadata
class MediaMetadata
Metadata of a MediaItem, playlist, or a combination of multiple sources of Metadata.
Summary
Nested types |
|---|
class MediaMetadata.BuilderA builder for |
@DocumentedThis annotation is deprecated. Use |
@DocumentedThe type of content described by the media item. |
@DocumentedThe picture type of the artwork. |
Constants |
|
|---|---|
const MediaMetadata! |
Empty |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
FOLDER_TYPE_NONE = -1This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
MEDIA_TYPE_ALBUM = 10
|
const Int |
MEDIA_TYPE_ARTIST = 11
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
MEDIA_TYPE_GENRE = 12
|
const Int |
MEDIA_TYPE_MIXED = 0Media of undetermined type or a mix of multiple |
const Int |
MEDIA_TYPE_MOVIE = 8
|
const Int |
MEDIA_TYPE_MUSIC = 1
|
const Int |
MEDIA_TYPE_NEWS = 5
|
const Int |
MEDIA_TYPE_PLAYLIST = 13
|
const Int |
MEDIA_TYPE_PODCAST = 16
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
MEDIA_TYPE_TV_SEASON = 19
|
const Int |
MEDIA_TYPE_TV_SERIES = 18
|
const Int |
|
const Int |
MEDIA_TYPE_VIDEO = 6
|
const Int |
MEDIA_TYPE_YEAR = 14
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
Public functions |
|
|---|---|
MediaMetadata.Builder! |
Returns a new |
Boolean |
Note: Equality checking does not consider |
java-static MediaMetadata! |
@UnstableApiRestores a |
Int |
hashCode() |
Bundle! |
Public properties |
|
|---|---|
CharSequence? |
Optional album artist. |
CharSequence? |
Optional album title. |
CharSequence? |
Optional artist. |
ByteArray<Byte>? |
Optional artwork data as a compressed byte array. |
@MediaMetadata.PictureType Int? |
Optional |
Uri? |
Optional artwork |
CharSequence? |
Optional compilation. |
CharSequence? |
Optional composer. |
CharSequence? |
Optional conductor. |
CharSequence? |
Optional description. |
Int? |
Optional disc number. |
CharSequence? |
Optional display title. |
Long? |
Optional duration, non-negative and in milliseconds. |
Bundle? |
Optional extras |
@MediaMetadata.FolderType Int? |
This property is deprecated. Use |
CharSequence? |
Optional genre. |
Boolean? |
Optional boolean to indicate that the media is a browsable folder. |
Boolean? |
Optional boolean to indicate that the media is playable. |
@MediaMetadata.MediaType Int? |
Optional |
Rating? |
Optional overall |
Int? |
Optional day of the recording date. |
Int? |
Optional month of the recording date. |
Int? |
Optional year of the recording date. |
Int? |
Optional day of the release date. |
Int? |
Optional month of the release date. |
Int? |
Optional year of the release date. |
CharSequence? |
Optional name of the station streaming the media. |
CharSequence? |
Optional subtitle. |
ImmutableList<String!>! |
The IDs of the supported commands of this media item (see for instance |
CharSequence? |
Optional title. |
Int? |
Optional total number of discs. |
Int? |
Optional total number of tracks. |
Int? |
Optional track number. |
Rating? |
Optional user |
CharSequence? |
Optional writer. |
Int? |
This property is deprecated. Use |
Constants
FOLDER_TYPE_ALBUMS
const val FOLDER_TYPE_ALBUMS = 2: Int
Type for a folder containing media categorized by album.
FOLDER_TYPE_ARTISTS
const val FOLDER_TYPE_ARTISTS = 3: Int
Type for a folder containing media categorized by artist.
FOLDER_TYPE_GENRES
const val FOLDER_TYPE_GENRES = 4: Int
Type for a folder containing media categorized by genre.
FOLDER_TYPE_MIXED
const val FOLDER_TYPE_MIXED = 0: Int
Type for a folder containing media of mixed types.
FOLDER_TYPE_PLAYLISTS
const val FOLDER_TYPE_PLAYLISTS = 5: Int
Type for a folder containing a playlist.
FOLDER_TYPE_TITLES
const val FOLDER_TYPE_TITLES = 1: Int
Type for a folder containing only playable media.
FOLDER_TYPE_YEARS
const val FOLDER_TYPE_YEARS = 6: Int
Type for a folder containing media categorized by year.
MEDIA_TYPE_ALBUM
const val MEDIA_TYPE_ALBUM = 10: Int
MediaType for a group of items (e.g., music) belonging to an album.
MEDIA_TYPE_ARTIST
const val MEDIA_TYPE_ARTIST = 11: Int
MediaType for a group of items (e.g., music) from the same artist.
MEDIA_TYPE_AUDIO_BOOK
const val MEDIA_TYPE_AUDIO_BOOK = 15: Int
MediaType for a group of items forming an audio book. Items in this group are typically of type MEDIA_TYPE_AUDIO_BOOK_CHAPTER.
MEDIA_TYPE_AUDIO_BOOK_CHAPTER
const val MEDIA_TYPE_AUDIO_BOOK_CHAPTER = 2: Int
MediaType for an audio book chapter.
MEDIA_TYPE_FOLDER_AUDIO_BOOKS
const val MEDIA_TYPE_FOLDER_AUDIO_BOOKS = 26: Int
MediaType for a folder containing audio books.
MEDIA_TYPE_FOLDER_MIXED
const val MEDIA_TYPE_FOLDER_MIXED = 20: Int
MediaType for a folder with mixed or undetermined content.
MEDIA_TYPE_FOLDER_RADIO_STATIONS
const val MEDIA_TYPE_FOLDER_RADIO_STATIONS = 31: Int
MediaType for a folder containing radio stations.
MEDIA_TYPE_FOLDER_TRAILERS
const val MEDIA_TYPE_FOLDER_TRAILERS = 34: Int
MediaType for a folder containing movie trailers.
MEDIA_TYPE_FOLDER_TV_CHANNELS
const val MEDIA_TYPE_FOLDER_TV_CHANNELS = 28: Int
MediaType for a folder containing TV channels.
MEDIA_TYPE_GENRE
const val MEDIA_TYPE_GENRE = 12: Int
MediaType for a group of items (e.g., music) of the same genre.
MEDIA_TYPE_MIXED
const val MEDIA_TYPE_MIXED = 0: Int
Media of undetermined type or a mix of multiple media types.
MEDIA_TYPE_PLAYLIST
const val MEDIA_TYPE_PLAYLIST = 13: Int
MediaType for a group of items (e.g., music) forming a playlist.
MEDIA_TYPE_PODCAST
const val MEDIA_TYPE_PODCAST = 16: Int
MediaType for a group of items belonging to a podcast. Items in this group are typically of type MEDIA_TYPE_PODCAST_EPISODE.
MEDIA_TYPE_PODCAST_EPISODE
const val MEDIA_TYPE_PODCAST_EPISODE = 3: Int
MediaType for a podcast episode.
MEDIA_TYPE_TV_CHANNEL
const val MEDIA_TYPE_TV_CHANNEL = 17: Int
MediaType for a group of items that are part of a TV channel. Items in this group are typically of type MEDIA_TYPE_TV_SHOW, MEDIA_TYPE_TV_SERIES or MEDIA_TYPE_MOVIE.
MEDIA_TYPE_TV_SEASON
const val MEDIA_TYPE_TV_SEASON = 19: Int
MediaType for a group of items that are part of a TV series. Items in this group are typically of type MEDIA_TYPE_TV_SHOW.
MEDIA_TYPE_TV_SERIES
const val MEDIA_TYPE_TV_SERIES = 18: Int
MediaType for a group of items that are part of a TV series. Items in this group are typically of type MEDIA_TYPE_TV_SHOW or MEDIA_TYPE_TV_SEASON.
MEDIA_TYPE_YEAR
const val MEDIA_TYPE_YEAR = 14: Int
MediaType for a group of items (e.g., music) from the same year.
Public functions
buildUpon
fun buildUpon(): MediaMetadata.Builder!
Returns a new Builder instance with the current MediaMetadata fields.
fromBundle
@UnstableApi
java-static fun fromBundle(bundle: Bundle!): MediaMetadata!
Restores a MediaMetadata from a Bundle.
Public properties
artworkDataType
@MediaMetadata.PictureType
val artworkDataType: @MediaMetadata.PictureType Int?
Optional PictureType of the artwork data.
durationMs
val durationMs: Long?
Optional duration, non-negative and in milliseconds.
This field is populated by the app when building the metadata object and is for informational purpose only. For retrieving the duration of the media item currently being played, use getDuration instead.
extras
val extras: Bundle?
Optional extras Bundle.
Given the complexities of checking the equality of two Bundle instances, the contents of these extras are not considered in the equals and hashCode implementation.
folderType
@MediaMetadata.FolderType
val folderType: @MediaMetadata.FolderType Int?
Optional FolderType.
isBrowsable
val isBrowsable: Boolean?
Optional boolean to indicate that the media is a browsable folder.
recordingDay
val recordingDay: Int?
Optional day of the recording date.
Note that there is no guarantee that the month and day are a valid combination.
recordingMonth
val recordingMonth: Int?
Optional month of the recording date.
Note that there is no guarantee that the month and day are a valid combination.
releaseDay
val releaseDay: Int?
Optional day of the release date.
Note that there is no guarantee that the month and day are a valid combination.
releaseMonth
val releaseMonth: Int?
Optional month of the release date.
Note that there is no guarantee that the month and day are a valid combination.
subtitle
val subtitle: CharSequence?
Optional subtitle.
This is the secondary title of the media, unrelated to closed captions.
supportedCommands
@UnstableApi
val supportedCommands: ImmutableList<String!>!
The IDs of the supported commands of this media item (see for instance
CommandButton.sessionCommand.customAction of the Media3 session module).