feat: YouTube-style seek indicator for keyboard seeking - #953
Conversation
Flash a pill showing the seeked amount when seeking with the arrow keys on the desktop controls. Repeated presses in the same direction keep it visible and accumulate the total (10s, 20s, 30s, ...); the opposite direction resets it. Gated by the new ChewieController.showSeekIndicator option (default true).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #953 +/- ##
==========================================
+ Coverage 43.82% 50.97% +7.15%
==========================================
Files 21 22 +1
Lines 1602 1642 +40
==========================================
+ Hits 702 837 +135
+ Misses 900 805 -95 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Replace the hardcoded 10s seek step with a new ChewieController.keyboardSeekDuration option (default 10 seconds) that drives both the arrow-key seek and the amount shown by the indicator.
|
Hi @diegotori 👋 Beyond this PR, I'd like to offer to help with maintenance on chewie if you're open to it. A bit of context:
I know the open-PR queue is long, and I'd be glad to take some of that load off you: triaging and reviewing PRs, keeping the package current with new Flutter releases, and helping land fixes. Would you be open to adding me as a co-maintainer (or triage access to start)? Happy to do whatever works best for you and the Flutter Community org. Either way, thanks for maintaining this 🙏 |
What
Adds a YouTube-style seek indicator that flashes on screen when the user seeks with the keyboard arrows on the desktop controls (
MaterialDesktopControls).10s→20s→30s), just like YouTube.How
lib/src/seek_indicator.dart(fades viaAnimatedOpacity, mirrors the existingCenterSeekButtonstyle; purely visual — wrapped inIgnorePointer)._MaterialDesktopControlsStateaccumulates the seeked seconds in_seekForward/_seekBackward(kept in sync with the existingDurationseek step) and auto-hides via aTimer, mirroring the existing buffering-indicator pattern.ChewieController.showSeekIndicatoroption (defaulttrue), wired throughcopyWith.Tests
test/seek_indicator_test.dartcovers accumulation on repeated presses, direction reset, auto fade-out, theshowSeekIndicator: falseopt-out, and the option default/copyWith.dart format,flutter analyze lib test, and the fullflutter testsuite are clean.