fixed smooth transitions issue
This commit is contained in:
parent
f6d0aeafd7
commit
479d7d3cdd
@ -584,7 +584,11 @@ export function useTransitionPlayback(
|
|||||||
lastLoadedSourceUrlRef.current = playableSourceUrl;
|
lastLoadedSourceUrlRef.current = playableSourceUrl;
|
||||||
currentPlayableUrlRef.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(() => {
|
startWatchdogTimerRef.current = setTimeout(() => {
|
||||||
if (didStartPlaybackRef.current || didFinishRef.current) return;
|
if (didStartPlaybackRef.current || didFinishRef.current) return;
|
||||||
@ -632,7 +636,7 @@ export function useTransitionPlayback(
|
|||||||
|
|
||||||
const onCanPlay = () => {
|
const onCanPlay = () => {
|
||||||
if (didFinishRef.current) return;
|
if (didFinishRef.current) return;
|
||||||
if (isReverseMode && didStartPlaybackRef.current) return;
|
if (isReverseMode) return; // Don't play for reverse mode
|
||||||
attemptPlay();
|
attemptPlay();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user