mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
feat: Add LitePlayerScreen for video playback with EPG, channel switching, and keyboard controls.
This commit is contained in:
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,
|
||||
|
||||
Reference in new issue
Block a user