Fix double-click to toggle fullscreen on desktop

This commit is contained in:
Micah Morrison
2026-01-20 15:23:37 -05:00
parent c4479660e9
commit 8b8c249988
@@ -926,11 +926,29 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
final isMobile = PlatformDetector.isMobile(context);
if (!isMobile) {
final DateTime now = DateTime.now();
// Always perform the single-click behavior immediately
if (widget.canControl && _clickVideoTogglesPlayback) {
widget.player.playOrPause();
} else {
_toggleControls();
}
// Detect double-click
final bool isDoubleClick = _lastSkipTapTime != null && now.difference(_lastSkipTapTime!).inMilliseconds < 250;
if (isDoubleClick) {
_lastSkipTapTime = null;
// Perform desktop double-click action: toggle fullscreen
_toggleFullscreen();
return;
}
// Record this click as a candidate for double-click detection
_lastSkipTapTime = now;
return;
}