mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

Problem: There is nothing in the Cache interface that enforces that these methods are implemented by reading/writing content metadata, however our own code (CacheDataSource) relies on this property since it mixes use of [get|set]ContentLength and use of metadata. Using metadata is the right approach because it minimizes the number of index writes (e.g. it allows the redirect URI and the content length to be committed by a single write). Solution: Remove [get|set]ContentLength, which are redundant anyway, and use metadata everywhere. Also expose the keys being used through the public API; there's no particular reason why they shouldn't be. We previously had an API for getting and setting content length, but no API for getting and setting redirect uri. PiperOrigin-RevId: 225383211
ExoPlayer library
The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.