Skip to content

remotion: Fix correct display of trimmed @remotion/media video#6850

Merged
JonnyBurger merged 1 commit intomainfrom
fix-premount-display
Mar 17, 2026
Merged

remotion: Fix correct display of trimmed @remotion/media video#6850
JonnyBurger merged 1 commit intomainfrom
fix-premount-display

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

No description provided.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Mar 17, 2026 10:42am
remotion Ready Ready Preview, Comment Mar 17, 2026 10:42am

Request Review

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks correct. Adding trimBefore to videoConfig.durationInFrames compensates for the subtraction that calculateMediaDuration performs, ensuring the timeline displays the correct duration for trimmed videos.

The change is minimal and targeted. One suggestion: the PR body is empty — consider documenting what bug this fixes for future reference.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow runpullfrog.com𝕏


const mediaDuration = calculateMediaDuration({
mediaDurationInFrames: videoConfig.durationInFrames,
mediaDurationInFrames: videoConfig.durationInFrames + (trimBefore ?? 0),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JonnyBurger JonnyBurger merged commit f10138c into main Mar 17, 2026
16 checks passed
@JonnyBurger JonnyBurger deleted the fix-premount-display branch March 17, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant