Skip to content

fix: improve play/pause behavior on desktop#986

Open
alexmello735-del wants to merge 1 commit into
DonutWare:developfrom
alexmello735-del:fix/pause-with-mouse-slip
Open

fix: improve play/pause behavior on desktop#986
alexmello735-del wants to merge 1 commit into
DonutWare:developfrom
alexmello735-del:fix/pause-with-mouse-slip

Conversation

@alexmello735-del
Copy link
Copy Markdown

@alexmello735-del alexmello735-del commented May 9, 2026

Pull Request Description

Changed the GestureDetector on video_player_controls.dart:

  • onTap now handles only touch logic
  • onHorizontalDragDown handles pointer play/pause logic (previously on onTap), it triggers on clicks with mouse moving also, improving reliability.

Issue Being Fixed

Before, play/pause on click would not register if mouse was still moving when the click event triggered. But mouse movement is to be expected when quickly switching screens/windows, etc.

Resolves #580

Screenshots / Recordings

old: play/pause fails when mouse moving

old.2.mp4

new: play/pause works with mouse moving

new.2.mp4

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • If a new package was added, did you ensure it works for all supported platforms? Is the package well maintained
  • Check that any changes are related to the issue at hand.

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.

Click to pause/play sometimes not working

1 participant