feat: Add LitePlayerScreen for video playback with EPG, channel switching, and keyboard controls.

This commit is contained in:
Michael committed 2025-12-21 18:37:59 +01:00
1 parent d79d130126
commit dbde32d20a
2 files changed
+13 -2

No files matched your search

@@ -249,14 +249,24 @@ class _LitePlayerScreenState extends ConsumerState<LitePlayerScreen>
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<LitePlayerScreen>
void _switchChannel(int index) {
if (widget.channels == null) return;
setState(() => _currentIndex = index);
_onUserInteraction(); // Ensure OSD shows up and timer resets on channel change
_loadStream();
}
@@ -102,7 +102,7 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
),
),
Text(
'Version 1.3.9',
'Version 1.5.0',
style: GoogleFonts.inter(
fontSize: 13,
color: AppColors.textSecondary,