Package com.google.android.exoplayer2
Class MediaMetadata.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.MediaMetadata.Builder
-
- Enclosing class:
- MediaMetadata
public static final class MediaMetadata.Builder extends Object
A builder forMediaMetadatainstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
setTitle
public MediaMetadata.Builder setTitle(@Nullable CharSequence title)
Sets the title.
-
setArtist
public MediaMetadata.Builder setArtist(@Nullable CharSequence artist)
Sets the artist.
-
setAlbumTitle
public MediaMetadata.Builder setAlbumTitle(@Nullable CharSequence albumTitle)
Sets the album title.
-
setAlbumArtist
public MediaMetadata.Builder setAlbumArtist(@Nullable CharSequence albumArtist)
Sets the album artist.
-
setDisplayTitle
public MediaMetadata.Builder setDisplayTitle(@Nullable CharSequence displayTitle)
Sets the display title.
-
setSubtitle
public MediaMetadata.Builder setSubtitle(@Nullable CharSequence subtitle)
Sets the subtitle.This is the secondary title of the media, unrelated to closed captions.
-
setDescription
public MediaMetadata.Builder setDescription(@Nullable CharSequence description)
Sets the description.
-
setMediaUri
public MediaMetadata.Builder setMediaUri(@Nullable Uri mediaUri)
Sets the mediaUri.
-
setUserRating
public MediaMetadata.Builder setUserRating(@Nullable Rating userRating)
Sets the userRating.
-
setOverallRating
public MediaMetadata.Builder setOverallRating(@Nullable Rating overallRating)
Sets the overallRating.
-
populateFromMetadata
public MediaMetadata.Builder populateFromMetadata(Metadata metadata)
Sets all fields supported by theentrieswithin theMetadata.Fields are only set if the
Metadata.Entryhas an implementation forMetadata.Entry.populateMediaMetadata(Builder).In the event that multiple
Metadata.Entryobjects within theMetadatarelate to the sameMediaMetadatafield, then the last one will be used.
-
populateFromMetadata
public MediaMetadata.Builder populateFromMetadata(List<Metadata> metadataList)
Sets all fields supported by theentrieswithin the list ofMetadata.Fields are only set if the
Metadata.Entryhas an implementation forMetadata.Entry.populateMediaMetadata(Builder).In the event that multiple
Metadata.Entryobjects within any of theMetadatarelate to the sameMediaMetadatafield, then the last one will be used.
-
build
public MediaMetadata build()
Returns a newMediaMetadatainstance with the current builder values.
-
-