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

Assert that an exception is not thrown from DataSource.open if the DataSpec's start position is valid but its end position extends beyond the end of the data. HTTP based DataSource implementations have no good way of knowing when this is the case, so it makes sense to make this the required behaviour, rather than requiring an exception to be thrown or allowing both. There are also use cases where the caller may want to use the end position as an upper bound, without knowing for sure how long the content is. An example of this use case is wanting to pre-cache the first N bytes of a stream. This implies that any exception should be thrown after reading to the end of the data, rather than preemptively in open. Issue: #7326 PiperOrigin-RevId: 359063721
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.