mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
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:
1 parent
1a46f0ad63
commit
25de3f44cf
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
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user