🎥 Make videos programmatically with React
alright
Jonny Burger7ff2746de255
diff --git a/packages/core/src/enable-sequence-stack-traces.ts b/packages/core/src/enable-sequence-stack-traces.tsindex 95fde229a4..fa3a309829 100644--- a/packages/core/src/enable-sequence-stack-traces.ts+++ b/packages/core/src/enable-sequence-stack-traces.ts@@ -15,10 +15,12 @@ const enableProxy = <apply(target, thisArg, argArray) {if (componentsToAddStacksTo.includes(argArray[0])) {const [first, props, ...rest] = argArray;- const newProps = {- ...(props ?? {}),- stack: new Error().stack,- };+ const newProps = props.stack+ ? props+ : {+ ...(props ?? {}),+ stack: new Error().stack,+ };return Reflect.apply(target, thisArg, [first, newProps, ...rest]);}diff --git a/packages/core/src/loop/index.tsx b/packages/core/src/loop/index.tsxindex 0d2c1f0c01..57449cdcbc 100644--- a/packages/core/src/loop/index.tsx+++ b/packages/core/src/loop/index.tsx@@ -69,11 +69,11 @@ export const Loop: React.FC<LoopProps> & {const loopDisplay: LoopDisplay = useMemo(() => {return {- numberOfTimes: actualTimes,+ numberOfTimes: Math.min(compDuration / durationInFrames, times),startOffset: -from,durationInFrames,};- }, [actualTimes, durationInFrames, from]);+ }, [compDuration, durationInFrames, from, times]);const loopContext: LoopContextType = useMemo(() => {return {diff --git a/packages/core/src/video/Video.tsx b/packages/core/src/video/Video.tsxindex 8fbcdf1279..689a73e086 100644--- a/packages/core/src/video/Video.tsx+++ b/packages/core/src/video/Video.tsx@@ -94,6 +94,7 @@ const VideoForwardingFunction: React.ForwardRefRenderFunction<<Html5Video{...propsOtherThanLoop}ref={ref}+ stack={stack}_remotionInternalNativeLoopPassed/>);@@ -115,6 +116,7 @@ const VideoForwardingFunction: React.ForwardRefRenderFunction<<Html5Video{...propsOtherThanLoop}ref={ref}+ stack={stack}_remotionInternalNativeLoopPassed/></Loop>@@ -130,16 +132,14 @@ const VideoForwardingFunction: React.ForwardRefRenderFunction<layout="none"from={0 - (trimBeforeValue ?? 0)}showInTimeline={false}- durationInFrames={- ((trimAfterValue ?? 0) - (trimBeforeValue ?? 0)) /- (props.playbackRate ?? 1)- }+ durationInFrames={(trimAfterValue ?? 0) / (props.playbackRate ?? 1)}name={name}><Html5VideopauseWhenBuffering={pauseWhenBuffering ?? false}{...otherProps}ref={ref}+ stack={stack}/></Sequence>);