Buffering after maxBitrate change, instead of keeping playing previous resolution video like YouTube
Issue description
When changing maxBitrate like:
trackSelector?.parameters = trackSelector!!.parameters.withMaxVideoBitrate(bitrate)
Buffering is shown straight away, while on YouTube app when change from 144p to 720p video keep playing in low resolution until new resolution is available. Reproducible on demo app.
Reproduction steps
ExoPlayer demo app -> HLS Apple 16x9 change Video quality to lowest: 416x234 -> change video to 1920x1080 video stops until new chunks are loaded. Expected behaviour keep playing low quality until higher res video is loaded.
Version of ExoPlayer being used
Both r2.5.4 & 2.6.0
Device(s) and version(s) of Android being used
Android TV Emulator API 24 720p
Any suggestions are welcome.
This is correct, the track selector will invalidate the current selection which will potentially discard the buffered video. This is tracked by #2250. I will post an update there regarding how this could be done in client code.