Closed
Description
Media3 Version
1.0.0-beta02
Devices that reproduce the issue
Android Auto with Pixel 6 Pro
Devices that do not reproduce the issue
Reproducible in the demo app?
Not tested
Reproduction steps
In my onGetLibraryRoot
, I have the following code:
internal val rootMediaItem: MediaItem by lazy {
MediaItem.Builder()
.setMediaId(PARENT_ID)
.setMediaMetadata(
MediaMetadata.Builder()
.setFolderType(MediaMetadata.FOLDER_TYPE_MIXED)
.setIsPlayable(false)
.build()
)
.build()
}
override fun onGetLibraryRoot(
session: MediaLibrarySession,
browser: MediaSession.ControllerInfo,
params: LibraryParams?,
): ListenableFuture<LibraryResult<MediaItem>> {
val rootExtras = Bundle().apply {
putBoolean(
MediaConstants.BROWSER_SERVICE_EXTRAS_KEY_SEARCH_SUPPORTED,
true,
)
putBoolean("android.media.browse.CONTENT_STYLE_SUPPORTED", true)
putInt(
MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_BROWSABLE,
MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM,
)
putInt(
MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_PLAYABLE,
MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_LIST_ITEM,
)
}
val libraryParams = LibraryParams.Builder().setExtras(rootExtras).build()
return Futures.immediateFuture(LibraryResult.ofItem(rootMediaItem, libraryParams))
}
in onGetChildren
, I load all of my items and they are being displayed just fine:
Expected result
When selecting one, I'd expect to use the List of MediaItem
so that I can automatically skip ahead
Actual result
My queue contains only the selected item:
Media
Bug Report
- You will email the zip file produced by
adb bugreport
to [email protected] after filing this issue.