Skip to content

🎥 Make videos programmatically with React

render a video even if it is ended upon mounting

Jonny Burgerd6f0c83f66e8
diff --git a/packages/core/src/video/VideoForRendering.tsx b/packages/core/src/video/VideoForRendering.tsx
index e204619768..eead17c976 100644
--- a/packages/core/src/video/VideoForRendering.tsx
+++ b/packages/core/src/video/VideoForRendering.tsx
@@ -46,6 +46,12 @@ export const VideoForRendering: React.FC<RemotionVideoProps> = ({
const frameInSeconds = frame / videoConfig.fps;
const handle = delayRender();
if (videoRef.current.currentTime === frameInSeconds) {
+ // Still render if the first frame is already the end
+ // For example if delaying using <Sequence />
+ if (videoRef.current.ended) {
+ continueRender(handle);
+ return;
+ }
if (videoRef.current.readyState >= 2) {
continueRender(handle);
return;