@remotion/media: Add objectFit prop to <Video>#6924
Merged
JonnyBurger merged 6 commits intomainfrom Mar 30, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Reviewed PR #6924 and submitted feedback. Found one bug ( Task list (6/6 completed)
![]() |
Contributor
There was a problem hiding this comment.
Bug: The objectFit prop is not forwarded when VideoForRendering falls back to <OffthreadVideo>. At video-for-rendering.tsx:424, the fallback passes style={style} (the raw user style) but doesn't include objectFitProp. The user's objectFit prop is silently dropped in this path.
Pass styleWithObjectFit instead of style there — <OffthreadVideo> renders to <img> (a replaced element), so CSS object-fit via inline style works correctly.
Big Pickle (free) | 𝕏
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
objectFitprop to the<Video>component from@remotion/media, supporting'contain'(default),'cover','fill','none', and'scale-down'objectFitis passed viastyleor CSS class names (e.g. Tailwind'sobject-cover), since CSSobject-fiton<canvas>is not officially supportedAvailableFromtag and a test composition (ObjectFitTest) with a schema-driven dropdown to switch between modesTest plan
cd packages/example && bun run dev)video-tests/ObjectFitTestobjectFitbetweencover,contain,fill,none,scale-downusing the props panelobjectFitviastylelogs a console warningobjectFit: 'cover'and confirm the output is correct🤖 Generated with Claude Code