diff --git a/app/(auth)/player/direct-player.tsx b/app/(auth)/player/direct-player.tsx index eadc61fd..0286a51b 100644 --- a/app/(auth)/player/direct-player.tsx +++ b/app/(auth)/player/direct-player.tsx @@ -1041,7 +1041,7 @@ export default function page() { // TV: Navigate to next item const goToNextItem = useCallback(() => { - if (!nextItem || !settings) return; + if (!nextItem || !settings || isPlaybackStopped) return; const { mediaSource: newMediaSource, @@ -1074,6 +1074,7 @@ export default function page() { stream?.mediaSource, bitrateValue, router, + isPlaybackStopped, ]); // Apply subtitle settings when video loads diff --git a/components/tv/TVNextEpisodeCountdown.tsx b/components/tv/TVNextEpisodeCountdown.tsx index e6360875..6582cacb 100644 --- a/components/tv/TVNextEpisodeCountdown.tsx +++ b/components/tv/TVNextEpisodeCountdown.tsx @@ -131,6 +131,11 @@ export const TVNextEpisodeCountdown: FC = ({ } }, ); + + // Cancel animation on unmount to prevent onFinish from firing after exit + return () => { + cancelAnimation(progress); + }; }, [show, isPlaying, progress]); const progressStyle = useAnimatedStyle(() => ({ diff --git a/components/video-player/controls/NextEpisodeCountDownButton.tsx b/components/video-player/controls/NextEpisodeCountDownButton.tsx index e769c2f5..7a47e66e 100644 --- a/components/video-player/controls/NextEpisodeCountDownButton.tsx +++ b/components/video-player/controls/NextEpisodeCountDownButton.tsx @@ -7,6 +7,7 @@ import { View, } from "react-native"; import Animated, { + cancelAnimation, Easing, runOnJS, useAnimatedStyle, @@ -45,6 +46,11 @@ const NextEpisodeCountDownButton: React.FC = ({ } }, ); + + // Cancel animation on unmount to prevent onFinish from firing after exit + return () => { + cancelAnimation(progress); + }; } }, [show, onFinish]);