toIviMediaItem

Converts the media1 media item to an IviMediaItem.


Converts the media metadata to an IviMediaItem.

Media metadata is used in media1 to represent the active media item.

Note: This uses the values from Media1Metadata.getBundle instead of Media1Metadata.getDescription, since the latter

  • is a separate object that may not already have been created;

  • is an interpretation of the raw values in the bundle, which would lead to the artist being present in the artist and the title field.


Converts the media1 queue item to an IviMediaItem, with the assumption that anything in a queue is playable, but nothing is browsable.


fun MediaDescriptionCompat.toIviMediaItem(isBrowsable: Boolean = false, isPlayable: Boolean = false): IviMediaItem

Converts the media description to an IviMediaItem.