🎥 Make videos programmatically with React
works nicely
Jonny Burgerb6ff054ee490
diff --git a/packages/core/src/Sequence.tsx b/packages/core/src/Sequence.tsxindex 133352fa30..fe5e944f1d 100644--- a/packages/core/src/Sequence.tsx+++ b/packages/core/src/Sequence.tsx@@ -324,16 +324,16 @@ const PremountedPostmountedSequenceRefForwardingFunction: React.ForwardRefRender// Determine which freeze frame to useconst freezeFrame = premountingActive- ? 0+ ? from: postmountingActive- ? durationInFrames - 1+ ? from + durationInFrames - 1: 0;const isFreezingActive = premountingActive || postmountingActive;const style = useMemo(() => {return {...passedStyle,- opacity: premountingActive || postmountingActive ? 0.5 : 1,+ opacity: premountingActive || postmountingActive ? 0 : 1,pointerEvents:premountingActive || postmountingActive? 'none'@@ -349,14 +349,6 @@ const PremountedPostmountedSequenceRefForwardingFunction: React.ForwardRefRenderstyleWhilePostmounted,]);- console.log('premountingActive', {- isFreezingActive,- premountingActive,- postmountingActive,- freezeFrame,- style,- });-return (<Freeze frame={freezeFrame} active={isFreezingActive}><Sequencediff --git a/packages/studio/src/components/Timeline/TimelineSequence.tsx b/packages/studio/src/components/Timeline/TimelineSequence.tsxindex 13f3386357..263de2dd3d 100644--- a/packages/studio/src/components/Timeline/TimelineSequence.tsx+++ b/packages/studio/src/components/Timeline/TimelineSequence.tsx@@ -175,7 +175,7 @@ const Inner: React.FC<{><TimelineSequenceFramepremounted={isPremounting}- postmounted={isPostmounting}+ postmounted={isPostmounting ? s.duration - 1 : null}roundedFrame={roundedFrame}/></div>diff --git a/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx b/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsxindex 154e07de91..00bc292ff0 100644--- a/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx+++ b/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx@@ -10,14 +10,14 @@ const relativeFrameStyle: React.CSSProperties = {export const TimelineSequenceFrame: React.FC<{readonly roundedFrame: number;readonly premounted: boolean;- readonly postmounted: boolean;+ readonly postmounted: number | null;}> = ({roundedFrame, premounted, postmounted}) => {return (<div style={relativeFrameStyle}>{premounted? '0 (Premounted)'- : postmounted- ? 'Last (Postmounted)'+ : postmounted !== null+ ? `${postmounted} (Postmounted)`: roundedFrame}</div>);