Repository navigation
@remotion/studio: Add defaultPremountInSeconds option - #12054
Merged
Merged
Conversation
Contributor
Contributor
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion below.
Reviewed changes
- Default premount context: new
DefaultPremountContext+DEFAULT_PREMOUNT_IN_SECONDS(0in v4,2in v5).usePremountingand<Sequence>now resolve the default from context instead of the compile-time v5fps, so the v5 default also moves fromfps(1 s) to 2 s. - Recursion fix:
PremountedPostmountedSequencerendersRegularSequencedirectly rather than re-entering the dispatch path, so the default is no longer applied a second time inside the premount wrapper. - Player: new validated
defaultPremountInSecondsprop, threaded throughInternals.DefaultPremountContext. - Config / CLI:
default-premount-in-secondsoption wired toConfig.setDefaultPremountInSeconds, theremotion studioCLI flag, Studio runtime config, and Studio settings. - Docs: v5 migration guide,
sequence/series/player/premountingpages, new option page, regenerated option sidebar positions.
ℹ️ Nitpicks
- No automated tests accompany the new option. The validation in
validateDefaultPremountInSeconds(rejects non-numbers,NaN/Infinity, negatives) and the precedence chain (--default-premount-in-seconds→ config file → compile-time default) are easy to pin with a focused test next to the existing config-reset/option tests, and would also lock in thepremountFor={0}opt-out behavior.
deepseek-v4.1-flash | 𝕏
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (incremental — only c11164b since the prior review at d80ebbe)
- Premounting guide rewrite (
packages/docs/docs/player/premounting.mdx): restructured around per-componentpremountFor, added a component/availability table, a default-premount-duration section (Studio config/CLI/settings plus the Player prop), a<Series>/<TransitionSeries>section, and a buffer-state note. - Verified the new behavior claims against the code:
<Series layout="absolute-fill" premountFor>and<TransitionSeries premountFor>do forward throughTrackWithoutSchematoSequence, the table'sAvailableFromvalues match the individual component docs (e.g.media4.0.495,Img/AnimatedImage/Gif4.0.497,AbsoluteFill/Lottie/shapes/ThreeCanvas4.0.528), andstatic/img/premount.pngand the importedPremounting/NoPremountingcomponents exist. sequence.mdx/series.mdx: default text now reads0s (v4) /2s (v5), consistent with the option and migration guide.
deepseek-v4.1-flash | 𝕏
This branch was successfully deployed
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.

Add
defaultPremountInSecondsto configure premounting for timed components without an explicitpremountFor. Studio exposes the value throughConfig.setDefaultPremountInSeconds(),--default-premount-in-seconds, and Studio settings; Player exposes it as a prop.The default is 0 seconds in v4 and 2 seconds in v5. The empty template explicitly sets 2 seconds, including when created in the browser Studio. Explicit
premountForvalues retain precedence, and rendering is unaffected. This replaces the hardcoded v5 premount duration and avoids applying the default recursively inside the premount wrapper.Rewrote the premounting guide around direct component props, with a shared explanation for images and animations, default premounting, and preparing whole scenes. The guide also documents premounting entire Series and TransitionSeries containers, including Series' required
layout="absolute-fill"setting.The existing SDK Canvas/vibe-code browser workflow now retries transient DOM detachment while waiting for the timeline bar, then verifies the edited durations and persisted source.
Validation:
bun run buildbun run stylecheckPreview
<Player><Sequence><Series>