Skip to content

feat: Progressive long-press seek with continuous scrubbing - #2858

Open
neffex97 wants to merge 1 commit into
PixelPlayerHQ:masterfrom
neffex97:feature/long-press-seek
Open

neffex97 wants to merge 1 commit into
PixelPlayerHQ:masterfrom
neffex97:feature/long-press-seek

Conversation

@neffex97

Copy link
Copy Markdown

Description

This PR introduces a smooth, continuous scrubbing feature when the user long-presses the next or previous buttons in the playback controls.

Implementation Details

  • Smooth Scrubbing: Scrubber updates every 100ms for a buttery-smooth "Apple Music/Spotify" feel.
  • Progressive Acceleration:
    • Base seek rate: 5x (5 seconds per second).
    • Accelerated seek rate: 10x (10 seconds per second) after the user holds the button for 3 seconds.
  • Haptic Feedback Optimization: Haptics are throttled to fire every 400ms to prevent overwhelming the device vibration motor during the 100ms rapid UI updates.
  • Clean Architecture: Refactored PlayerViewModel and PlaybackStateHolder to accept precise continuous delta updates seamlessly.

- Add continuous scrubbing when long-pressing next/previous buttons
- Scrub rate accelerates from 5x to 10x after holding for 3 seconds
- Refactor PlayerViewModel and PlaybackStateHolder to support precise continuous delta seeks
- Update AnimatedPlaybackControls for seamless gesture handling with pointer input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant