diff --git a/app/live.tsx b/app/live.tsx index 217e977..d7c06f9 100644 --- a/app/live.tsx +++ b/app/live.tsx @@ -16,7 +16,6 @@ export default function LiveScreen() { const [currentChannelIndex, setCurrentChannelIndex] = useState(0); const [isLoading, setIsLoading] = useState(false); - const [isPlayerLoading, setIsPlayerLoading] = useState(true); const [isChannelListVisible, setIsChannelListVisible] = useState(false); const [channelTitle, setChannelTitle] = useState(null); const titleTimer = useRef(null); @@ -51,14 +50,6 @@ export default function LiveScreen() { loadChannels(); }, []); - const handlePlaybackStatusUpdate = (status: AVPlaybackStatus) => { - if (status.isLoaded) { - setIsPlayerLoading(!status.isPlaying && !status.isBuffering); - } else { - setIsPlayerLoading(true); - } - }; - const showChannelTitle = (title: string) => { setChannelTitle(title); if (titleTimer.current) clearTimeout(titleTimer.current); @@ -98,16 +89,7 @@ export default function LiveScreen() { return ( - - {isPlayerLoading && ( - - - - )} + {}} /> void; } +const PLAYBACK_TIMEOUT = 15000; // 15 seconds + export default function LivePlayer({ streamUrl, channelTitle, onPlaybackStatusUpdate }: LivePlayerProps) { const video = useRef