feat: implement IPTV player with HLS.js and mpegts.js, supporting stream playback, loading/error states, and parent window communication.

This commit is contained in:
Michael committed 2025-12-07 10:20:42 +01:00
1 parent 2e2bd2b0ad
commit 04ea24e42b
2 files changed
+24 -1

No files matched your search

@@ -416,6 +416,29 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
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) ...[
+1 -1
View File
@@ -97,7 +97,7 @@
<body>
<div id="player-container">
<video id="video" controls autoplay></video>
<video id="video" autoplay></video>
<div id="loading">
<div class="spinner"></div>
<div id="loading-text">Loading stream...</div>