Skip to content

🎥 Make videos programmatically with React

Preserve v5 general premount defaults independently of Studio

JonnyBurger055b74e383bc
diff --git a/packages/core/src/default-premount-in-seconds.ts b/packages/core/src/default-premount-in-seconds.ts
index 55426331cc..667f37c270 100644
--- a/packages/core/src/default-premount-in-seconds.ts
+++ b/packages/core/src/default-premount-in-seconds.ts
@@ -1,4 +1,6 @@
-export const DEFAULT_PREMOUNT_IN_SECONDS = 0;
+import {ENABLE_V5_BREAKING_CHANGES} from './v5-flag.js';
+
+export const DEFAULT_PREMOUNT_IN_SECONDS = ENABLE_V5_BREAKING_CHANGES ? 2 : 0;
export const DEFAULT_STUDIO_PREMOUNT_IN_SECONDS = 2;
export const validateDefaultPremountInSeconds = (value: unknown) => {
diff --git a/packages/docs/docs/5-0-migration.mdx b/packages/docs/docs/5-0-migration.mdx
index 20b386f2c4..d1d1fd516d 100644
--- a/packages/docs/docs/5-0-migration.mdx
+++ b/packages/docs/docs/5-0-migration.mdx
@@ -174,6 +174,14 @@ loadFont('normal', {
**Required action**: Ensure custom fonts are loaded before calling these APIs, or pass `validateFontIsLoaded: false` explicitly to keep the previous behavior. See [layout utils best practices](/docs/layout-utils/best-practices).
+## Default premount duration is now 2 seconds
+
+The general [premount duration](/docs/player/premounting) for timed components changes from `0` to `2` seconds in Remotion 5, including in the [Player](/docs/player/player). The [Studio default](/docs/player/premounting#default-premounting-in-studio) is separate: it has been `2` seconds since v4.0.535 and does not change in v5.
+
+This prepares assets before components appear. Explicit `premountFor` props continue to take precedence. Premounting does not affect rendering.
+
+**Required action**: To keep the v4 Player default, pass [`defaultPremountInSeconds={0}`](/docs/player/player#defaultpremountinseconds). For an individual component, pass [`premountFor={0}`](/docs/sequence#premountfor). To configure the Studio default independently, use [`Config.setDefaultPremountInSeconds()`](/docs/config#setdefaultpremountinseconds), [`--default-premount-in-seconds`](/docs/options/default-premount-in-seconds), or the Studio settings.
+
## `<Player>` does not create shared audio tags by default
The default [`numberOfSharedAudioTags`](/docs/player/player#numberofsharedaudiotags) value of the [`<Player>`](/docs/player/player) has changed from `5` to `0`.
diff --git a/packages/docs/docs/player/api.mdx b/packages/docs/docs/player/api.mdx
index 9fbb5ae67c..09a563377b 100644
--- a/packages/docs/docs/player/api.mdx
+++ b/packages/docs/docs/player/api.mdx
@@ -414,7 +414,7 @@ Either `player-size` (default) or `composition-size`:
### `defaultPremountInSeconds?`<AvailableFrom v="4.0.535" />
-The default [premount duration](/docs/player/premounting) in seconds for timed components inside the Player. Defaults to `0`.
+The default [premount duration](/docs/player/premounting) in seconds for timed components inside the Player. Defaults to `0` in v4 and `2` in v5.
Must be a finite, non-negative number. The duration is converted to frames using `fps` and rounded to the nearest frame.
An explicit [`premountFor`](/docs/sequence#premountfor) prop takes precedence, including `premountFor={0}` to disable premounting for a component.
diff --git a/packages/docs/docs/player/premounting.mdx b/packages/docs/docs/player/premounting.mdx
index 1678966bbb..90b05e350f 100644
--- a/packages/docs/docs/player/premounting.mdx
+++ b/packages/docs/docs/player/premounting.mdx
@@ -35,9 +35,9 @@ Open Settings in the top-right corner of Studio. Under Playback, change "Default
## Default premounting in the Player
-The [Player](/docs/player) does not premount components by default.
+The [Player](/docs/player) defaults to `0` seconds of premounting in Remotion 4 and `2` seconds in [Remotion 5](/docs/5-0-migration#default-premount-duration-is-now-2-seconds). This follows the general premounting default, which is separate from Studio's default of `2` seconds starting in v4.0.535.
-Pass the [`defaultPremountInSeconds`](/docs/player/player#defaultpremountinseconds) prop to do so:
+Pass the [`defaultPremountInSeconds`](/docs/player/player#defaultpremountinseconds) prop to override this default:
```tsx twoslash title="MyPlayer.tsx"
import {Player} from '@remotion/player';
diff --git a/packages/docs/docs/sequence.mdx b/packages/docs/docs/sequence.mdx
index c0dd30183d..30f1dd023e 100644
--- a/packages/docs/docs/sequence.mdx
+++ b/packages/docs/docs/sequence.mdx
@@ -309,7 +309,7 @@ If `layout` is set to `none`, there is no container and setting this style is no
### `premountFor?`<AvailableFrom v="4.0.140" />
[Premount](/docs/player/premounting) the sequence for a set number of frames.
-The default is `2` seconds in the [Studio](/docs/player/premounting#default-premounting-in-studio) and `0` seconds in the [Player](/docs/player/premounting#default-premounting-in-the-player), converted to frames. An explicit `premountFor` takes precedence.
+The [Studio default](/docs/player/premounting#default-premounting-in-studio) is `2` seconds starting in v4.0.535. The general default, used by the [Player](/docs/player/premounting#default-premounting-in-the-player), is `0` seconds in v4 and `2` seconds in [v5](/docs/5-0-migration#default-premount-duration-is-now-2-seconds). Seconds are converted to frames. An explicit `premountFor` takes precedence.
### `postmountFor?`<AvailableFrom v="4.0.340" />
diff --git a/packages/docs/docs/series.mdx b/packages/docs/docs/series.mdx
index b50621d70f..3a60e6c6a4 100644
--- a/packages/docs/docs/series.mdx
+++ b/packages/docs/docs/series.mdx
@@ -110,7 +110,7 @@ Whether this sequence should be shown in the timeline in the Studio. See [`showI
### `premountFor?`<AvailableFrom v="4.0.140"/>
[Premount](/docs/player/premounting) the sequence for a set number of frames.
-The default is `2` seconds in the [Studio](/docs/player/premounting#default-premounting-in-studio) and `0` seconds in the [Player](/docs/player/premounting#default-premounting-in-the-player), converted to frames. An explicit `premountFor` takes precedence.
+The [Studio default](/docs/player/premounting#default-premounting-in-studio) is `2` seconds starting in v4.0.535. The general default, used by the [Player](/docs/player/premounting#default-premounting-in-the-player), is `0` seconds in v4 and `2` seconds in [v5](/docs/5-0-migration#default-premount-duration-is-now-2-seconds). Seconds are converted to frames. An explicit `premountFor` takes precedence.
### `ref?`<AvailableFrom v="3.3.4" />