Is there a way to download metadata (duration) for all MediaItems in a playlist?
See original GitHub issueSearched documentation and issues
StackOverflow, Issues, Documentation, Blog
Question
When loading/playing a playlist using the new playlist api introduced in 2.12.0, only data for the first item is loaded up until a few seconds before the transition to the next item happens. Window.durationMs
from the second item stays C.TIME_UNSET
until this point.
While this is perfectly fine for most applications, I do need the duration of all MediaItem
s in the playlist upon loading.
This leads me to the question if there is any way to configure the loading behaviour of a playlist to include the duration (manifest?) of all items right at the beginning?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Customize media notifications and handle playlists
With the brand new Media Session API, you can now customize media notifications by providing metadata for the media your web app is...
Read more >Creating and Configuring Playlists - Kaltura Knowledge Center
Select the Content tab and then select the Playlists tab. · Select Add Playlist. · The Add New Playlist screen opens. · Click...
Read more >How to Fix Plex Metadata / Agent Download Problems
In this video, I show you how to fix common Plex Media Server problems with the retrieval of the correct cover art, background...
Read more >Web API - Spotify for Developers
Based on simple REST principles, the Spotify Web API endpoints return JSON metadata about music artists, albums, and tracks, directly from the Spotify...
Read more >MediaStore.Audio.Playlists - Android Developers
The "instance ID" GUID as defined by the XMP Media Management standard, extracted from any XMP metadata contained within this media item.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I created a playlist with 4 items. With the default configuration the first two items are prepared initially (the media is quite short that’s why the second item is prepared as well). But then it waits until playback advances to prepare the third and fourth item.
The third item is prepared after about 69 seconds:
When setting
useLazyPreparation
to false, all media sources are prepared immediately as expected:The logs (printed by
EventLogger
) show that all fourSOURCE_UPDATE
s arrived after 0.77 seconds when the media position is still on 0.0. The list of windows in the log is kept at a max of 3 but it shows that the durations are available already.If you see a different behaviour, can you add the
EventLogger
to your app and do a bug report when you prepare your player and the upload this here so I can investigate?Thanks @marcbaechinger, this helped me out a lot. The workaround propposed in the issue might work for us as well. 👍