From 25de3f44cffdcb381029f519efcb797f72978390 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Sun, 7 Dec 2025 10:20:42 +0100 Subject: [PATCH] feat: implement IPTV player with HLS.js and mpegts.js, supporting stream playback, loading/error states, and parent window communication. --- lib/features/iptv/screens/player_screen.dart | 23 ++++++++++++++++++++ web/player.html | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/features/iptv/screens/player_screen.dart b/lib/features/iptv/screens/player_screen.dart index 3f43661..d870fdf 100644 --- a/lib/features/iptv/screens/player_screen.dart +++ b/lib/features/iptv/screens/player_screen.dart @@ -416,6 +416,29 @@ class _PlayerScreenState extends ConsumerState { children: [ // HTML5 video player via iframe HtmlElementView(viewType: _viewId), + + // GLOBAL INTERACTION LAYER (Fixes Click/Hover issues) + // This transparent layer sits ABOVE the iframe but BELOW the controls. + // It intercepts all pointer events, enabling Flutter to handle them. + Positioned.fill( + child: PointerInterceptor( + child: MouseRegion( + onHover: (_) => _onHover(), + child: GestureDetector( + // Toggle controls on tap + onTap: () { + if (_showControls) { + _hideControls(); + } else { + _onHover(); + } + }, + behavior: HitTestBehavior.translucent, + child: Container(color: Colors.transparent), + ), + ), + ), + ), // Hover Controls Layer if (_showControls) ...[ diff --git a/web/player.html b/web/player.html index 460badd..0f9958d 100644 --- a/web/player.html +++ b/web/player.html @@ -97,7 +97,7 @@
- +
Loading stream...