mirror of
https://github.com/androidx/media.git
synced 2025-05-09 16:40:55 +08:00

We check the fraction of the available duration we have already buffered for live streams to see if we can increase the quality. This fraction compares against the overall available media duration at the time of the track selection, which by definition can't include one of the availabe chunks (as this is the one we want to load next). That means, for example, that for a reasonable live offset of 3 segments we can at most reach a fraction of 0.66, which is less than our default threshold of 0.75, meaning we can never switch up. By subtracting one chunk duration from the available duration, we make this comparison fair again and allow all live streams (regardless of live offset) to reach up to 100% buffered data (which is above our default value of 75%), so that they can increase the quality. Issue: google/ExoPlayer#9784 PiperOrigin-RevId: 416791033
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.