From dbde32d20a9024d032c0666095ddd61854baf73f Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Sun, 21 Dec 2025 18:37:59 +0100 Subject: [PATCH] feat: Add LitePlayerScreen for video playback with EPG, channel switching, and keyboard controls. --- .../features/iptv/screens/lite_player_screen.dart | 13 ++++++++++++- .../features/iptv/widgets/mobile_settings_tab.dart | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/mobile/features/iptv/screens/lite_player_screen.dart b/lib/mobile/features/iptv/screens/lite_player_screen.dart index 2fd5615..bc3e49e 100644 --- a/lib/mobile/features/iptv/screens/lite_player_screen.dart +++ b/lib/mobile/features/iptv/screens/lite_player_screen.dart @@ -249,14 +249,24 @@ class _LitePlayerScreenState extends ConsumerState void _onUserInteraction() { if (!mounted) return; + final wasShowing = _showControls; setState(() => _showControls = true); _resetControlsTimer(); + + // Auto-focus the play/pause button when OSD appears to ensure OK key works instantly + if (!wasShowing) { + Future.delayed(const Duration(milliseconds: 100), () { + if (mounted && _showControls) { + _playPauseFocusNode.requestFocus(); + } + }); + } } void _resetControlsTimer() { _controlsTimer?.cancel(); if (_showControls && _isPlaying) { - _controlsTimer = Timer(const Duration(seconds: 7), () { + _controlsTimer = Timer(const Duration(seconds: 12), () { if (mounted) setState(() => _showControls = false); }); } @@ -271,6 +281,7 @@ class _LitePlayerScreenState extends ConsumerState void _switchChannel(int index) { if (widget.channels == null) return; setState(() => _currentIndex = index); + _onUserInteraction(); // Ensure OSD shows up and timer resets on channel change _loadStream(); } diff --git a/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart b/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart index ad9e6a4..9de22ca 100644 --- a/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart +++ b/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart @@ -102,7 +102,7 @@ class _MobileSettingsTabState extends ConsumerState { ), ), Text( - 'Version 1.3.9', + 'Version 1.5.0', style: GoogleFonts.inter( fontSize: 13, color: AppColors.textSecondary,