From 4676ff800197676764940275a795415767192fcd Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 9 May 2026 00:24:10 -0300 Subject: [PATCH] fix: improve play/pause behavior on desktop from issue #580 --- lib/screens/video_player/video_player_controls.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/screens/video_player/video_player_controls.dart b/lib/screens/video_player/video_player_controls.dart index eb194fea5..bfb937edd 100644 --- a/lib/screens/video_player/video_player_controls.dart +++ b/lib/screens/video_player/video_player_controls.dart @@ -128,7 +128,7 @@ class _DesktopControlsState extends ConsumerState { children: [ Positioned.fill( child: GestureDetector( - onTap: initInputDevice == InputDevice.pointer ? () => player.playOrPause() : () => toggleOverlay(), + onTap: initInputDevice == InputDevice.pointer ? null : () => toggleOverlay(), onDoubleTapDown: initInputDevice == InputDevice.touch ? _handleDoubleTapDown : null, onDoubleTap: initInputDevice == InputDevice.pointer ? () => fullScreenHelper.toggleFullScreen(ref) @@ -138,6 +138,9 @@ class _DesktopControlsState extends ConsumerState { onVerticalDragStart: initInputDevice == InputDevice.touch ? _handleVerticalDragStart : null, onVerticalDragUpdate: initInputDevice == InputDevice.touch ? _handleVerticalDragUpdate : null, onVerticalDragEnd: initInputDevice == InputDevice.touch ? _handleVerticalDragEnd : null, + //better play/pause handling on Desktop (works with dragging on click) + onHorizontalDragDown: + initInputDevice == InputDevice.pointer ? (details) => player.playOrPause() : null, ), ), if (subtitleWidget != null) subtitleWidget,