[Bug]: Problem with not using cache when playing loop
Is there an existing issue for this?
- [x] I have searched the existing issues
Bug Description
If you check with the Android Studio Network Inspector, you can see continuous network download traffic during loop playback. Shouldn't the cached video be used for subsequent playbacks?
Steps to Reproduce
Run the app and check it in Android Studio Network Inspector.
Expected Behavior
use cache for subsequent playbacks?
Actual Behavior
make another network download
Package Version
4.0.4
Platform(s)
Android
Flutter Channel
stable
Flutter Doctor Output
[✓] Flutter (Channel stable, 3.35.6, on macOS 15.6 24G84 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2025.2.3)
[✓] Connected device (4 available)
[✓] Network resources
Minimal Reproduction Code
final playerController = CachedVideoPlayerPlus.networkUrl(
Uri.parse(playbackUrl),
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: false),
);
await playerController.initialize();
await playerController.controller.setLooping(true);
Relevant Log Output
Device Information
Additional Context
No response
Would you like to work on this issue?
- [ ] I'm interested in working on this issue
A video_player controller is created at the initialization of the CachedVideoPlayerPlus and used throughout its lifetime. When a new instance is created it checks for a cache and uses it if available. This is working as expected.
However, updating the controller seems like a great improvement for performance and resource usage. I’m too busy to implement this complex feature so I’m relying on the community for contributions. Labelling as such.