You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will only work on the main branch for now (because you need df07fa3), so you will need to build the library locally. It will be included in 1.6.0.
You could also use the framework MediaExtractor implementation for this if you don't need to use media3.
By size, I assume you mean file size? We don't have an easy way to expose that in media3. You can probably do some combination of (configuring this via passing a custom DataSource.Factory instance to the MediaExtractorCompat constructor):
Use StatsDataSource wrapped around DefaultDataSource and grab getBytesRead() after loading each file.
Use StatsDataSource.getLastResponseHeaders() after loading each file instead, and read the Content-Length HTTP header.
There is an option to retrieve metadata without playback as mentioned in the docs.
Is it possible to get duration and size of an mp3 file (https in my case) without playback?
My use case is that I want to show duration and size of all my playlist items.
The text was updated successfully, but these errors were encountered: