MetadataExtras


class MetadataExtras


Defines constants for extra keys in android.support.v4.media.MediaMetadataCompat or androidx.media3.common.MediaMetadata.

Summary

Constants

const String!
KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI"

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format.

const String!
KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI"

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format.

const String!
KEY_DESCRIPTION_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_DESCRIPTION_LINK_MEDIA_ID"

Bundle key used in the extras of a media item to indicate that the description of the corresponding media item can be linked to another media item ID.

const String!
KEY_IMMERSIVE_AUDIO = "androidx.car.app.mediaextensions.KEY_IMMERSIVE_AUDIO"

Bundle key used in the extras of a media item to indicate an immersive audio experience.

const String!
KEY_SUBTITLE_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_SUBTITLE_LINK_MEDIA_ID"

Bundle key used in the extras of a media item to indicate that the subtitle of the corresponding media item can be linked to another media item ID.

Constants

KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI

Added in 1.4.0
const val KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI": String!

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format. This drawable must be rendered in large views showing information about the currently playing media item, in an area roughly equivalent to 15 characters of subtitle.

TYPE: String - a uri pointing to local content (ie not on the web) that can be parsed into a android.graphics.drawable.Drawable

KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI

Added in 1.4.0
const val KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI": String!

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format. This drawable may be rendered in smaller views showing information about a media item, in an area roughly equivalent to 2 characters of subtitle.

TYPE: String - a uri pointing to local content (ie not on the web) that can be parsed into a android.graphics.drawable.Drawable

Added in 1.4.0
const val KEY_DESCRIPTION_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_DESCRIPTION_LINK_MEDIA_ID": String!

Bundle key used in the extras of a media item to indicate that the description of the corresponding media item can be linked to another media item ID.

The value of the extra is set to the media ID of this other item.

NOTE: media1 and media3 apps setting this extra must implementonLoadItem or onGetItem respectively.

NOTE: media apps setting this extra must explicitly set the description property.

See METADATA_KEY_DISPLAY_DESCRIPTION

See description

TYPE: String.

Example:

  "Source" MediaItem
     + mediaId:                  “Beethoven-9th-symphony”    // ID
     + title:                    “9th symphony”              // Track
     + subtitle:                 “The best of Beethoven”     // Album
     + subtitleLinkMediaId:      “Beethoven-best-of”         // Album ID
     + description:              “Beethoven”                 // Artist
╔════+ descriptionLinkMediaId:   “artist:Beethoven”          // Artist ID
║
║ "Destination" MediaItem
╚════+ mediaId:                  “artist:Beethoven”          // ID
     + title:                    “Beethoven”                 // Artist

KEY_IMMERSIVE_AUDIO

Added in 1.4.0
const val KEY_IMMERSIVE_AUDIO = "androidx.car.app.mediaextensions.KEY_IMMERSIVE_AUDIO": String!

Bundle key used in the extras of a media item to indicate an immersive audio experience. Car OEMs should carefully consider which audio effects should be enabled for such content.

TYPE: long - to enable, use value METADATA_VALUE_ATTRIBUTE_PRESENT

Added in 1.4.0
const val KEY_SUBTITLE_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_SUBTITLE_LINK_MEDIA_ID": String!

Bundle key used in the extras of a media item to indicate that the subtitle of the corresponding media item can be linked to another media item ID.

The value of the extra is set to the media ID of this other item.

NOTE: media1 and media3 apps setting this extra must implementonLoadItem or onGetItem respectively.

NOTE: media apps setting this extra must explicitly set the subtitle property.

See METADATA_KEY_DISPLAY_SUBTITLE

See subtitle

TYPE: String.

Example:

  "Source" MediaItem
     + mediaId:                  “Beethoven-9th-symphony”    // ID
     + title:                    “9th symphony”              // Track
     + subtitle:                 “The best of Beethoven”     // Album
╔════+ subtitleLinkMediaId:      “Beethoven-best-of”         // Album ID
║    + description:              “Beethoven”                 // Artist
║    + descriptionLinkMediaId:   “artist:Beethoven”          // Artist ID
║
║ "Destination" MediaItem
╚════+ mediaId:                  “Beethoven-best-of”         // ID
     + title:                    “The best of Beethoven”     // Album
     + subtitle:                 “Beethoven”                 // Artist
     + subtitleLinkMediaId:      “artist:Beethoven”          // Artist ID