fixed smooth transitions issue

This commit is contained in:
Dmitri 2026-04-06 16:51:31 +04:00
parent f6d0aeafd7
commit 479d7d3cdd

View File

@ -584,7 +584,11 @@ export function useTransitionPlayback(
lastLoadedSourceUrlRef.current = playableSourceUrl;
currentPlayableUrlRef.current = playableSourceUrl;
attemptPlay();
// Only attempt play for forward playback
// For reverse mode, wait for canplaythrough to trigger startReverse()
if (!isReverseMode) {
attemptPlay();
}
startWatchdogTimerRef.current = setTimeout(() => {
if (didStartPlaybackRef.current || didFinishRef.current) return;
@ -632,7 +636,7 @@ export function useTransitionPlayback(
const onCanPlay = () => {
if (didFinishRef.current) return;
if (isReverseMode && didStartPlaybackRef.current) return;
if (isReverseMode) return; // Don't play for reverse mode
attemptPlay();
};