-
Notifications
You must be signed in to change notification settings - Fork 574
Description
Hi team,
First of all, huge thanks to the Media3 team for providing the MediaLibraryService—it's been a great experience integrating Android Auto support using this service. The structure is clean, and the onboarding has been much smoother compared to previous APIs. 🙌
I'm working on an Android Auto integration using MediaLibraryService from the Media3 library. In my app, I need to support live streams where the duration is undefined or unknown.
MediaMetadata.Builder()
.putLong(MediaMetadata.METADATA_KEY_DURATION, -1L)
.build()
should theoretically hide or disable the time duration display in the Android Auto player UI. However, even after setting METADATA_KEY_DURATION = -1L, Android Auto continues to show the duration bar and values like 0:00 / 0:00, which is misleading for live content.
🔍 What I tried:
Set duration as -1L in MediaMetadata.
Returned this metadata via onGetChildren and onGetItem from MediaLibraryService.
Confirmed the metadata is correctly received in the MediaBrowser.
📸 Screenshot:
Here's an actual screenshot showing the issue where a live stream is still showing duration values:
❓ Questions
Is there an officially supported way to suppress the duration in Android Auto UI for live streams using MediaLibraryService?
Does Media3 have any known limitations or requirements for Android Auto to respect METADATA_KEY_DURATION = -1L?