[video_player] Improve seek performance on Android (#11810) Adds `backBufferDurationMs` to `VideoPlayerOptions` and configures ExoPlayer's `DefaultLoadControl` to retain the back buffer from keyframes. This significantly improves seek performance and responsiveness during video playback on Android. iOS already has some kind of back buffering implemented in AVPlayer because the replays and seeks are instantaneous for small videos. Before: Replays and seeks on Android for network based video assets involve a network call to fetch the video content. This significantly hampers the user experience. After: Replays and seeks on Android (within the back buffer duration) are instant just like in iOS. Improving user experience This PR partly addresses https://github.com/flutter/flutter/issues/97428. Not enabling back buffering by default and instead allowing the app to configure as per need. The default behavior will be same as the existing implementation to avoid any regressions. ## Pre-Review Checklist
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: