From 63e77c5bc599c1b694974cbeb1e0556431a81b14 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 30 Mar 2026 18:01:54 +0200 Subject: [PATCH] feat: implement native media player screen with optimized playback and buffering configurations --- .../iptv/screens/native_player_screen.dart | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/lib/features/iptv/screens/native_player_screen.dart b/lib/features/iptv/screens/native_player_screen.dart index 10f20f9..e0db171 100644 --- a/lib/features/iptv/screens/native_player_screen.dart +++ b/lib/features/iptv/screens/native_player_screen.dart @@ -87,10 +87,6 @@ class _NativePlayerScreenState extends ConsumerState final bool _isSeeking = false; bool _useSoftwareDecoder = false; - // [TiviMate] Zapping OSD — shown for 3s after each channel switch - bool _showZappingOSD = false; - Timer? _zappingOSDTimer; - // [TiviMate] Channel List Sidebar bool _showChannelList = false; Timer? _channelListTimer; @@ -492,7 +488,6 @@ class _NativePlayerScreenState extends ConsumerState _controlsTimer?.cancel(); _epgTimer?.cancel(); _liveWatchdog?.cancel(); - _zappingOSDTimer?.cancel(); _channelListTimer?.cancel(); _channelListScrollController.dispose(); @@ -925,15 +920,10 @@ class _NativePlayerScreenState extends ConsumerState void _switchChannel(int index) { setState(() { _currentIndex = index; - _showZappingOSD = true; _showChannelList = false; // close sidebar on switch - _showControls = false; // hide regular OSD — Zapping OSD takes over - }); - // Show zapping OSD for 3 seconds - _zappingOSDTimer?.cancel(); - _zappingOSDTimer = Timer(const Duration(seconds: 3), () { - if (mounted) setState(() => _showZappingOSD = false); + _showControls = true; // show regular OSD }); + _resetControlsTimer(); _loadStream(); } @@ -1344,13 +1334,6 @@ class _NativePlayerScreenState extends ConsumerState ), ), - // [TiviMate] Zapping OSD — shown briefly on channel switch - if (_showZappingOSD && - widget.streamType == model.StreamType.live && - widget.channels != null && - widget.channels!.isNotEmpty) - _buildZappingOSD(), - // [TiviMate] Channel list sidebar if (_showChannelList && widget.streamType == model.StreamType.live && @@ -1638,6 +1621,7 @@ class _NativePlayerScreenState extends ConsumerState return _buildVodControlsOverlay(); } + /* /// [TiviMate] Zapping OSD — brief overlay on channel switch (like TiviMate) Widget _buildZappingOSD() { final ch = widget.channels![_currentIndex]; @@ -1777,6 +1761,7 @@ class _NativePlayerScreenState extends ConsumerState ), ); } + */ /// [TiviMate] Channel list sidebar — slide-in panel on the right Widget _buildChannelListSidebar() {