🎥 Make videos programmatically with React
`@remotion/player`: Avoid frame updating after pause has been hit
JonnyBurger12bcff9501a5
diff --git a/packages/player/src/use-playback.ts b/packages/player/src/use-playback.tsindex ffd768efda..153e3ca69f 100644--- a/packages/player/src/use-playback.ts+++ b/packages/player/src/use-playback.ts@@ -27,7 +27,7 @@ export const usePlayback = ({}) => {const config = Internals.useUnsafeVideoConfig();const frame = Internals.Timeline.useTimelinePosition();- const {playing, pause, emitter} = usePlayer();+ const {playing, pause, emitter, isPlaying} = usePlayer();const setFrame = Internals.Timeline.useTimelineSetFrame();// requestAnimationFrame() does not work if the tab is not active.@@ -95,6 +95,10 @@ export const usePlayback = ({return;}+ if (!isPlaying()) {+ return;+ }+const time = performance.now() - startedTime;const actualLastFrame = outFrame ?? config.durationInFrames - 1;const actualFirstFrame = inFrame ?? 0;