diff --git a/.replit b/.replit index cd990cf..3f9dff8 100644 --- a/.replit +++ b/.replit @@ -23,6 +23,10 @@ externalPort = 3001 localPort = 35637 externalPort = 3000 +[[ports]] +localPort = 41879 +externalPort = 3002 + [env] PORT = "5000" diff --git a/client/src/pages/LivePage.tsx b/client/src/pages/LivePage.tsx index f27aab1..577992f 100644 --- a/client/src/pages/LivePage.tsx +++ b/client/src/pages/LivePage.tsx @@ -48,6 +48,19 @@ export default function LivePage() { updateMetaTag('og:type', 'video.other'); }, []); + // Initialize player immediately on mount + useEffect(() => { + initializePlayer(); + return () => { + if (hlsRef.current) { + hlsRef.current.destroy(); + } + if (videoRef.current) { + videoRef.current.src = ''; + } + }; + }, []); + // Callback ref to properly handle video element mounting const videoCallbackRef = (element: HTMLVideoElement | null) => { if (element && element !== videoRef.current) { @@ -257,19 +270,6 @@ export default function LivePage() { } }; - if (isLoading) { - return ( -
Connecting to live stream...
-