Skip to content

🎥 Make videos programmatically with React

Enable Sequence Activity by default with a stable limit option

Jonny Burgerb2b7ea4d3f50
diff --git a/packages/browser-studio/src/BrowserStudio.tsx b/packages/browser-studio/src/BrowserStudio.tsx
index e9bba6a6ad..1894a43217 100644
--- a/packages/browser-studio/src/BrowserStudio.tsx
+++ b/packages/browser-studio/src/BrowserStudio.tsx
@@ -1,7 +1,6 @@
import type {RenderDefaults} from '@remotion/studio-shared';
import {studioHtml} from '@remotion/studio-shared/studio-html';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
-import {NoReactInternals} from 'remotion/no-react';
import {
createBrowserStudioHmrAssetManager,
type BrowserStudioHmrBridge,
@@ -677,9 +676,7 @@ export const BrowserStudio: React.FC<BrowserStudioProps> = ({
showLayerFrameNumbers: false,
showPremounting: null,
defaultPremountInSeconds: null,
- experimentalSequenceActivityEnabled: false,
- experimentalSequenceActivityLimit:
- NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
+ sequenceActivityLimit: null,
askAIEnabled: false,
bufferStateDelayInMilliseconds: null,
defaultCodingAgent: null,
diff --git a/packages/bundler/src/bundle.ts b/packages/bundler/src/bundle.ts
index c764eb7867..4048cd14e2 100644
--- a/packages/bundler/src/bundle.ts
+++ b/packages/bundler/src/bundle.ts
@@ -463,9 +463,7 @@ export const internalBundle = async (
showLayerFrameNumbers: false,
showPremounting: null,
defaultPremountInSeconds: null,
- experimentalSequenceActivityEnabled: false,
- experimentalSequenceActivityLimit:
- NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
+ sequenceActivityLimit: null,
askAIEnabled: actualArgs.askAIEnabled,
bufferStateDelayInMilliseconds: actualArgs.bufferStateDelayInMilliseconds,
canvasTabsEnabled: true,
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index f5baac6fff..7054724bf2 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -150,8 +150,7 @@ const {
canvasTabsOption,
forceNewStudioOption,
experimentalKeepAudioContextAliveOption,
- experimentalSequenceActivityOption,
- experimentalSequenceActivityLimitOption,
+ sequenceActivityLimitOption,
numberOfSharedAudioTagsOption,
ipv4Option,
pixelFormatOption,
@@ -660,10 +659,8 @@ type FlatConfig = RemotionConfigObject &
* Omitted actions use their default shortcut. Set an action to null to disable it.
*/
setKeyboardShortcuts: (shortcuts: StudioKeyboardShortcuts) => void;
- /** Enable experimental Sequence Activity in Studio. Default: false. */
- setExperimentalSequenceActivityEnabled: (enabled: boolean) => void;
- /** Set the hidden Sequence Activity limit in Studio. Default: 20. */
- setExperimentalSequenceActivityLimit: (limit: number) => void;
+ /** Set the hidden Sequence Activity limit in Studio. Default: Infinity. Set to 0 to disable. */
+ setSequenceActivityLimit: (limit: number) => void;
/**
* Set the audio codec to use for the output video.
* See the Encoding guide in the docs for defaults and available options.
@@ -824,10 +821,7 @@ export const Config: FlatConfig = {
setKeyboardShortcuts,
setInteractivityEnabled: interactivityOption.setConfig,
setCanvasTabsEnabled: canvasTabsOption.setConfig,
- setExperimentalSequenceActivityEnabled:
- experimentalSequenceActivityOption.setConfig,
- setExperimentalSequenceActivityLimit:
- experimentalSequenceActivityLimitOption.setConfig,
+ setSequenceActivityLimit: sequenceActivityLimitOption.setConfig,
setAllowHtmlInCanvasEnabled: allowHtmlInCanvasOption.setConfig,
setRspack: rspackOption.setConfig,
setExperimentalRspackEnabled: rspackOption.setConfig,
diff --git a/packages/cli/src/parsed-cli.ts b/packages/cli/src/parsed-cli.ts
index 0b3a651d09..c9679f0d2b 100644
--- a/packages/cli/src/parsed-cli.ts
+++ b/packages/cli/src/parsed-cli.ts
@@ -40,8 +40,7 @@ const {
publicLicenseKeyOption,
forceNewStudioOption,
experimentalKeepAudioContextAliveOption,
- experimentalSequenceActivityOption,
- experimentalSequenceActivityLimitOption,
+ sequenceActivityLimitOption,
numberOfSharedAudioTagsOption,
ipv4Option,
pixelFormatOption,
@@ -135,11 +134,8 @@ export type CommandLineOptions = {
[experimentalKeepAudioContextAliveOption.cliFlag]: TypeOfOption<
typeof experimentalKeepAudioContextAliveOption
> | null;
- [experimentalSequenceActivityOption.cliFlag]: TypeOfOption<
- typeof experimentalSequenceActivityOption
- > | null;
- [experimentalSequenceActivityLimitOption.cliFlag]: TypeOfOption<
- typeof experimentalSequenceActivityLimitOption
+ [sequenceActivityLimitOption.cliFlag]: TypeOfOption<
+ typeof sequenceActivityLimitOption
>;
[offthreadVideoCacheSizeInBytesOption.cliFlag]: TypeOfOption<
typeof offthreadVideoCacheSizeInBytesOption
@@ -271,7 +267,6 @@ export const BooleanFlags = [
isProductionOption.cliFlag,
forceNewStudioOption.cliFlag,
experimentalKeepAudioContextAliveOption.cliFlag,
- experimentalSequenceActivityOption.cliFlag,
bundleCacheOption.cliFlag,
rspackOption.cliFlag,
skipSkillsOption.cliFlag,
@@ -301,7 +296,6 @@ export const parsedCli = minimist<CommandLineOptions>(process.argv.slice(2), {
[isProductionOption.cliFlag]: null,
[forceNewStudioOption.cliFlag]: null,
[experimentalKeepAudioContextAliveOption.cliFlag]: null,
- [experimentalSequenceActivityOption.cliFlag]: null,
[mutedOption.cliFlag]: null,
[enableCancellationOption.cliFlag]: null,
[rspackOption.cliFlag]: null,
diff --git a/packages/cli/src/print-help.ts b/packages/cli/src/print-help.ts
index 8a96662874..4f43a69818 100644
--- a/packages/cli/src/print-help.ts
+++ b/packages/cli/src/print-help.ts
@@ -81,8 +81,7 @@ const studioOptions = options(
'disable-keyboard-shortcuts',
'disable-canvas-tabs',
'disable-interactivity',
- 'experimental-sequence-activity',
- 'experimental-sequence-activity-limit',
+ 'sequence-activity-limit',
'allow-html-in-canvas',
'editor',
'coding-agent',
diff --git a/packages/cli/src/studio.ts b/packages/cli/src/studio.ts
index 32c8c37244..15dde60878 100644
--- a/packages/cli/src/studio.ts
+++ b/packages/cli/src/studio.ts
@@ -45,8 +45,7 @@ const {
canvasTabsOption,
forceNewStudioOption,
experimentalKeepAudioContextAliveOption,
- experimentalSequenceActivityOption,
- experimentalSequenceActivityLimitOption,
+ sequenceActivityLimitOption,
numberOfSharedAudioTagsOption,
audioLatencyHintOption,
ipv4Option,
@@ -168,6 +167,12 @@ export const studioCommand = async (
commandLine: parsedCli,
}).value;
+ const sequenceActivityLimit = sequenceActivityLimitOption.getValue({
+ commandLine: parsedCli,
+ }).value;
+ const configuredSequenceActivityLimit =
+ sequenceActivityLimitOption.getConfigValue();
+
return {
maxTimelineTracks: ConfigInternals.getMaxTimelineTracks(),
defaultPremountInSeconds: defaultPremountInSecondsOption.getValue({
@@ -184,13 +189,8 @@ export const studioCommand = async (
commandLine: parsedCli,
}).value,
elementLibraries: ConfigInternals.getElementLibraries(),
- experimentalSequenceActivityEnabled:
- experimentalSequenceActivityOption.getValue({commandLine: parsedCli})
- .value,
- experimentalSequenceActivityLimit:
- experimentalSequenceActivityLimitOption.getValue({
- commandLine: parsedCli,
- }).value,
+ sequenceActivityLimit:
+ sequenceActivityLimit === Infinity ? null : sequenceActivityLimit,
interactivityEnabled: interactivityOption.getValue({
commandLine: parsedCli,
}).value,
@@ -220,10 +220,10 @@ export const studioCommand = async (
beepOnFinish: beepOnFinishOption.getConfigValue(),
enableCrossSiteIsolation:
enableCrossSiteIsolationOption.getConfigValue(),
- experimentalSequenceActivityEnabled:
- experimentalSequenceActivityOption.getConfigValue(),
- experimentalSequenceActivityLimit:
- experimentalSequenceActivityLimitOption.getConfigValue(),
+ sequenceActivityLimit:
+ configuredSequenceActivityLimit === Infinity
+ ? null
+ : configuredSequenceActivityLimit,
interactivityEnabled: interactivityOption.getConfigValue(),
keyboardShortcutsEnabled: keyboardShortcutsOption.getConfigValue(),
logLevel: logLevelOption.getConfigValue(),
diff --git a/packages/cli/src/test/config-reload.test.ts b/packages/cli/src/test/config-reload.test.ts
index 381c05ba37..7eacea79aa 100644
--- a/packages/cli/src/test/config-reload.test.ts
+++ b/packages/cli/src/test/config-reload.test.ts
@@ -47,11 +47,16 @@ test('an invalid config reload keeps the previous configuration', async () => {
},
];
writeConfig(
- `const {Config} = require('@remotion/cli/config'); Config.setStudioPort(4321); Config.setDefaultEditor('cursor'); Config.setDefaultCodingAgent('codex'); Config.addElementLibrary({url: 'https://initial.example.com/elements', displayName: 'Initial Elements'});`,
+ `const {Config} = require('@remotion/cli/config'); Config.setSequenceActivityLimit(0); Config.setStudioPort(4321); Config.setDefaultEditor('cursor'); Config.setDefaultCodingAgent('codex'); Config.addElementLibrary({url: 'https://initial.example.com/elements', displayName: 'Initial Elements'});`,
);
await loadConfig(temporaryDirectory);
expect(ConfigInternals.getStudioPort()).toBe(4321);
+ expect(
+ BrowserSafeApis.options.sequenceActivityLimitOption.getValue({
+ commandLine: {},
+ }).value,
+ ).toBe(0);
expect(ConfigInternals.getElementLibraries()).toEqual(initialLibraries);
expect(
BrowserSafeApis.options.defaultEditorOption.getValue({commandLine: {}})
@@ -63,10 +68,15 @@ test('an invalid config reload keeps the previous configuration', async () => {
}).value,
).toBe('codex');
writeConfig(
- `const {Config} = require('@remotion/cli/config'); Config.setStudioPort(5678); Config.setDefaultEditor('windsurf'); Config.setDefaultCodingAgent('cursor'); Config.addElementLibrary({url: 'https://invalid.example.com/elements', displayName: 'Invalid Elements'}); throw new Error('Invalid config');`,
+ `const {Config} = require('@remotion/cli/config'); Config.setStudioPort(5678); Config.setDefaultEditor('windsurf'); Config.setDefaultCodingAgent('cursor'); Config.addElementLibrary({url: 'https://invalid.example.com/elements', displayName: 'Invalid Elements'}); Config.setSequenceActivityLimit(-1);`,
);
expect((await reloadTestConfig()).type).toBe('error');
expect(ConfigInternals.getStudioPort()).toBe(4321);
+ expect(
+ BrowserSafeApis.options.sequenceActivityLimitOption.getValue({
+ commandLine: {},
+ }).value,
+ ).toBe(0);
expect(ConfigInternals.getElementLibraries()).toEqual(initialLibraries);
expect(
BrowserSafeApis.options.defaultEditorOption.getValue({commandLine: {}})
@@ -108,10 +118,15 @@ test('an invalid config reload keeps the previous configuration', async () => {
expect(ConfigInternals.getElementLibraries()).toEqual(initialLibraries);
writeConfig(
- `const {Config} = require('@remotion/cli/config'); Config.setStudioPort(6789); Config.setDefaultEditor({type: 'custom', name: 'Acme Editor', executable: '/opt/acme/editor', arguments: ['--goto', '%TARGET_PATH%:%LINE_NUMBER%:%COLUMN_NUMBER%']}); Config.setDefaultCodingAgent('claude-code'); Config.addElementLibrary({url: 'https://reloaded.example.com/library', displayName: 'Reloaded Elements'});`,
+ `const {Config} = require('@remotion/cli/config'); Config.setSequenceActivityLimit(5); Config.setStudioPort(6789); Config.setDefaultEditor({type: 'custom', name: 'Acme Editor', executable: '/opt/acme/editor', arguments: ['--goto', '%TARGET_PATH%:%LINE_NUMBER%:%COLUMN_NUMBER%']}); Config.setDefaultCodingAgent('claude-code'); Config.addElementLibrary({url: 'https://reloaded.example.com/library', displayName: 'Reloaded Elements'});`,
);
expect((await reloadTestConfig()).type).toBe('success');
expect(ConfigInternals.getStudioPort()).toBe(6789);
+ expect(
+ BrowserSafeApis.options.sequenceActivityLimitOption.getValue({
+ commandLine: {},
+ }).value,
+ ).toBe(5);
expect(ConfigInternals.getElementLibraries()).toEqual([
{
displayName: 'Reloaded Elements',
@@ -139,6 +154,11 @@ test('an invalid config reload keeps the previous configuration', async () => {
);
expect((await reloadTestConfig()).type).toBe('success');
expect(ConfigInternals.getElementLibraries()).toEqual([]);
+ expect(
+ BrowserSafeApis.options.sequenceActivityLimitOption.getValue({
+ commandLine: {},
+ }).value,
+ ).toBe(Infinity);
expect(
BrowserSafeApis.options.defaultEditorOption.getValue({commandLine: {}})
.value,
diff --git a/packages/core/src/SequenceActivityBudget.tsx b/packages/core/src/SequenceActivityBudget.tsx
index bc8c2d4f9a..5046353a6a 100644
--- a/packages/core/src/SequenceActivityBudget.tsx
+++ b/packages/core/src/SequenceActivityBudget.tsx
@@ -129,7 +129,7 @@ export const SequenceActivityBudgetProvider: React.FC<{
const enabled = useContext(SequenceActivityContext);
const settings = useContext(SequenceActivitySettingsContext);
const limit = settings?.limit ?? DEFAULT_SEQUENCE_ACTIVITY_LIMIT;
- const admitting = enabled && limit > 0;
+ const admitting = enabled && limit > 0 && limit !== Infinity;
const [budget] = useState(createActivityBudget);
const timeline = useContext(
admitting ? TimelineContext : InactiveTimelineContext,
@@ -171,7 +171,9 @@ export const useSequenceActivityAdmission = (
const budget = useContext(ActivityBudgetContext);
const enabled = useContext(SequenceActivityContext);
const settings = useContext(SequenceActivitySettingsContext);
- const unlimited = enabled && settings?.limit === -1;
+ const unlimited =
+ enabled &&
+ (settings?.limit ?? DEFAULT_SEQUENCE_ACTIVITY_LIMIT) === Infinity;
const selected = useContext(ActivitySelectionContext);
const id = candidate?.id ?? null;
const parent = candidate?.parent ?? null;
diff --git a/packages/core/src/SequenceManager.tsx b/packages/core/src/SequenceManager.tsx
index ee55506d7a..86a42ce934 100644
--- a/packages/core/src/SequenceManager.tsx
+++ b/packages/core/src/SequenceManager.tsx
@@ -1,6 +1,7 @@
import React, {useCallback, useContext, useMemo, useRef, useState} from 'react';
export * from './sequence-registry-context.js';
import {
+ DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
SequenceActivityContext,
SequenceActivitySettingsContext,
} from './sequence-activity-context.js';
@@ -94,7 +95,7 @@ const SequenceManagerScopeProviders: React.FC<{
>
<SequenceActivityContext.Provider
value={
- activitySettings?.enabled === true &&
+ (activitySettings?.limit ?? DEFAULT_SEQUENCE_ACTIVITY_LIMIT) > 0 &&
isStudio &&
commitRegistrationEnabled &&
typeof React.Activity !== 'undefined'
diff --git a/packages/core/src/sequence-activity-context.ts b/packages/core/src/sequence-activity-context.ts
index ae2b526f45..23a09f2bbf 100644
--- a/packages/core/src/sequence-activity-context.ts
+++ b/packages/core/src/sequence-activity-context.ts
@@ -3,12 +3,11 @@ import type {TimelineContextValue} from './TimelineContext.js';
export {DEFAULT_SEQUENCE_ACTIVITY_LIMIT} from './sequence-activity-defaults.js';
-// Internal Studio experiment. Hidden Activity trees register on commit, so the
-// experiment is disabled when the sequence manager falls back to effects.
+// Hidden Activity trees register on commit, so Sequence Activity is disabled
+// when the sequence manager falls back to effects.
export const SequenceActivityContext = createContext(false);
export const SequenceActivityDormantContext = createContext(false);
export const SequenceActivitySettingsContext = createContext<{
- readonly enabled: boolean;
readonly limit: number;
} | null>(null);
diff --git a/packages/core/src/sequence-activity-defaults.ts b/packages/core/src/sequence-activity-defaults.ts
index 52a356fe79..fc2d63b7b8 100644
--- a/packages/core/src/sequence-activity-defaults.ts
+++ b/packages/core/src/sequence-activity-defaults.ts
@@ -1 +1 @@
-export const DEFAULT_SEQUENCE_ACTIVITY_LIMIT = 20;
+export const DEFAULT_SEQUENCE_ACTIVITY_LIMIT = Infinity;
diff --git a/packages/docs/docs/cli/studio.mdx b/packages/docs/docs/cli/studio.mdx
index b3702e9cdc..4acd34e74f 100644
--- a/packages/docs/docs/cli/studio.mdx
+++ b/packages/docs/docs/cli/studio.mdx
@@ -61,13 +61,9 @@ Inline JSON string isn't supported on Windows shells because it removes the `"`
<Options id="disable-interactivity" />
-### `--experimental-sequence-activity`<AvailableFrom v="4.0.535" />
+### `--sequence-activity-limit`<AvailableFrom v="4.0.536" />
-<Options id="experimental-sequence-activity" />
-
-### `--experimental-sequence-activity-limit`<AvailableFrom v="4.0.535" />
-
-<Options id="experimental-sequence-activity-limit" />
+<Options id="sequence-activity-limit" />
### `--allow-html-in-canvas`<AvailableFrom v="4.0.447" />
diff --git a/packages/docs/docs/config.mdx b/packages/docs/docs/config.mdx
index c2866b8739..881f14166b 100644
--- a/packages/docs/docs/config.mdx
+++ b/packages/docs/docs/config.mdx
@@ -283,29 +283,17 @@ Config.setCanvasTabsEnabled(false);
The [`--disable-canvas-tabs`](/docs/options/disable-canvas-tabs) flag takes precedence over this option.
-## `setExperimentalSequenceActivityEnabled()`<AvailableFrom v="4.0.535" />
+## `setSequenceActivityLimit()`<AvailableFrom v="4.0.536" />
-<Options id="experimental-sequence-activity" />
+<Options id="sequence-activity-limit" />
```ts twoslash title="remotion.config.ts"
import {Config} from '@remotion/cli/config';
// ---cut---
-Config.setExperimentalSequenceActivityEnabled(true);
+Config.setSequenceActivityLimit(20);
```
-The [`--experimental-sequence-activity`](/docs/options/experimental-sequence-activity) flag takes precedence over this option.
-
-## `setExperimentalSequenceActivityLimit()`<AvailableFrom v="4.0.535" />
-
-<Options id="experimental-sequence-activity-limit" />
-
-```ts twoslash title="remotion.config.ts"
-import {Config} from '@remotion/cli/config';
-// ---cut---
-Config.setExperimentalSequenceActivityLimit(20);
-```
-
-The [`--experimental-sequence-activity-limit`](/docs/options/experimental-sequence-activity-limit) flag takes precedence over this option.
+The [`--sequence-activity-limit`](/docs/options/sequence-activity-limit) flag takes precedence over this option.
## `setShowLayerFrameNumbers()`<AvailableFrom v="4.0.535" />
diff --git a/packages/docs/docs/options/experimental-sequence-activity-limit.mdx b/packages/docs/docs/options/experimental-sequence-activity-limit.mdx
deleted file mode 100644
index d2a39f2f04..0000000000
--- a/packages/docs/docs/options/experimental-sequence-activity-limit.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-image: /generated/articles-docs-options-experimental-sequence-activity-limit.png
-# Generated by packages/docs/generate-option-docs.ts. Do not edit directly.
-# Regenerate: cd packages/docs && bun run generate-option-docs
-title: "Experimental hidden Sequence Activity limit"
-crumb: Options
-custom_edit_url: https://github.com/remotion-dev/remotion/edit/main/packages/renderer/src/options/experimental-sequence-activity-limit.tsx
----
-
-# Experimental hidden Sequence Activity limit<AvailableFrom v="4.0.535" />
-
-Limit nearby hidden scenes discovered by experimental Sequence Activity in the Remotion Studio, including nested sequences and their ancestors. Visible, premounted, and postmounted scenes always render. Defaults to 20. Must be a safe integer of at least -1. Set to 0 to disable hidden discovery, or -1 for unlimited discovery without admission delays. Only applies when experimental Sequence Activity is enabled. Does not affect rendering.
-
-## CLI flag
-
-```text
---experimental-sequence-activity-limit <value>
-```
-
-The following CLI commands accept this option:
-
-- [`remotion studio`](/docs/cli/studio)
-
-## Config file
-
-```ts twoslash title="remotion.config.ts"
-import {Config} from '@remotion/cli/config';
-// ---cut---
-Config.setExperimentalSequenceActivityLimit(20);
-```
-
-## See also
-
-- [All options](/docs/options)
diff --git a/packages/docs/docs/options/experimental-sequence-activity.mdx b/packages/docs/docs/options/experimental-sequence-activity.mdx
deleted file mode 100644
index 8eca076c25..0000000000
--- a/packages/docs/docs/options/experimental-sequence-activity.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-image: /generated/articles-docs-options-experimental-sequence-activity.png
-# Generated by packages/docs/generate-option-docs.ts. Do not edit directly.
-# Regenerate: cd packages/docs && bun run generate-option-docs
-title: "Enable experimental Sequence Activity"
-crumb: Options
-custom_edit_url: https://github.com/remotion-dev/remotion/edit/main/packages/renderer/src/options/experimental-sequence-activity.tsx
----
-
-# Enable experimental Sequence Activity<AvailableFrom v="4.0.535" />
-
-Discover layers in nearby hidden scenes in the Remotion Studio before they become visible. This experimental feature may use more CPU. Disabled by default. Does not affect rendering.
-
-## CLI flag
-
-```text
---experimental-sequence-activity
-```
-
-The following CLI commands accept this option:
-
-- [`remotion studio`](/docs/cli/studio)
-
-## Config file
-
-```ts twoslash title="remotion.config.ts"
-import {Config} from '@remotion/cli/config';
-// ---cut---
-Config.setExperimentalSequenceActivityEnabled(true);
-```
-
-## See also
-
-- [All options](/docs/options)
diff --git a/packages/docs/docs/options/index.mdx b/packages/docs/docs/options/index.mdx
index cfcaebdfb7..5966cca4db 100644
--- a/packages/docs/docs/options/index.mdx
+++ b/packages/docs/docs/options/index.mdx
@@ -51,13 +51,11 @@ Only the CLI reads the config file. In programmatic APIs, you need to pass all o
- [Disallow parallel encoding](/docs/options/disallow-parallel-encoding) (`--disallow-parallel-encoding`)
- [Enable cancellation](/docs/options/enable-cancellation) (`--enable-cancellation`)
- [Enable Cross-Site Isolation](/docs/options/cross-site-isolation) (`--cross-site-isolation`)
-- [Enable experimental Sequence Activity](/docs/options/experimental-sequence-activity) (`--experimental-sequence-activity`)
- [Enable Lambda Insights](/docs/options/enable-lambda-insights) (`--enable-lambda-insights`)
- [Enable Multiprocess on Linux](/docs/options/enable-multiprocess-on-linux) (`--enable-multiprocess-on-linux`)
- [Enforce Audio Track](/docs/options/enforce-audio-track) (`--enforce-audio-track`)
- [Env File](/docs/options/env-file) (`--env-file`)
- [Every nth frame](/docs/options/every-nth-frame) (`--every-nth-frame`)
-- [Experimental hidden Sequence Activity limit](/docs/options/experimental-sequence-activity-limit) (`--experimental-sequence-activity-limit`)
- [FFmpeg -bufsize flag](/docs/options/buffer-size) (`--buffer-size`)
- [FFmpeg -maxrate flag](/docs/options/max-rate) (`--max-rate`)
- [For seamless AAC concatenation](/docs/options/for-seamless-aac-concatenation) (`--for-seamless-aac-concatenation`)
@@ -104,6 +102,7 @@ Only the CLI reads the config file. In programmatic APIs, you need to pass all o
- [Sample Rate](/docs/options/sample-rate) (`--sample-rate`)
- [Scale](/docs/options/scale) (`--scale`)
- [Separate audio to](/docs/options/separate-audio-to) (`--separate-audio-to`)
+- [Sequence Activity limit](/docs/options/sequence-activity-limit) (`--sequence-activity-limit`)
- [Show frame numbers of layer](/docs/options/show-layer-frame-numbers) (`--show-layer-frame-numbers`)
- [Show premounting in the Studio timeline](/docs/options/show-premounting) (`--show-premounting`)
- [Skip Skills](/docs/options/skip-skills) (`--skip-skills`)
diff --git a/packages/docs/docs/options/sequence-activity-limit.mdx b/packages/docs/docs/options/sequence-activity-limit.mdx
new file mode 100644
index 0000000000..371c31eaa4
--- /dev/null
+++ b/packages/docs/docs/options/sequence-activity-limit.mdx
@@ -0,0 +1,34 @@
+---
+image: /generated/articles-docs-options-sequence-activity-limit.png
+# Generated by packages/docs/generate-option-docs.ts. Do not edit directly.
+# Regenerate: cd packages/docs && bun run generate-option-docs
+title: "Sequence Activity limit"
+crumb: Options
+custom_edit_url: https://github.com/remotion-dev/remotion/edit/main/packages/renderer/src/options/sequence-activity-limit.tsx
+---
+
+# Sequence Activity limit<AvailableFrom v="4.0.536" />
+
+Limit hidden scenes discovered by Sequence Activity in the Remotion Studio, including nested sequences and their ancestors. Visible, premounted, and postmounted scenes always render. Defaults to `Infinity` for unlimited discovery without admission delays. Must be a non-negative safe integer or `Infinity`. Set to 0 to disable Sequence Activity. Finite limits prioritize nearby scenes. Does not affect rendering.
+
+## CLI flag
+
+```text
+--sequence-activity-limit <value>
+```
+
+The following CLI commands accept this option:
+
+- [`remotion studio`](/docs/cli/studio)
+
+## Config file
+
+```ts twoslash title="remotion.config.ts"
+import {Config} from '@remotion/cli/config';
+// ---cut---
+Config.setSequenceActivityLimit(20);
+```
+
+## See also
+
+- [All options](/docs/options)
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 5649718135..55fbb6172a 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -1026,24 +1026,6 @@ export const articles = [
noAi: false,
slug: 'options/experimental-keep-audio-context-alive',
},
- {
- id: 'options/experimental-sequence-activity',
- title: 'Enable experimental Sequence Activity',
- relativePath: 'docs/options/experimental-sequence-activity.mdx',
- compId: 'articles-docs-options-experimental-sequence-activity',
- crumb: 'Options',
- noAi: false,
- slug: 'options/experimental-sequence-activity',
- },
- {
- id: 'options/experimental-sequence-activity-limit',
- title: 'Experimental hidden Sequence Activity limit',
- relativePath: 'docs/options/experimental-sequence-activity-limit.mdx',
- compId: 'articles-docs-options-experimental-sequence-activity-limit',
- crumb: 'Options',
- noAi: false,
- slug: 'options/experimental-sequence-activity-limit',
- },
{
id: 'options/for-seamless-aac-concatenation',
title: 'For seamless AAC concatenation',
@@ -1458,6 +1440,15 @@ export const articles = [
noAi: false,
slug: 'options/sequence',
},
+ {
+ id: 'options/sequence-activity-limit',
+ title: 'Sequence Activity limit',
+ relativePath: 'docs/options/sequence-activity-limit.mdx',
+ compId: 'articles-docs-options-sequence-activity-limit',
+ crumb: 'Options',
+ noAi: false,
+ slug: 'options/sequence-activity-limit',
+ },
{
id: 'options/show-layer-frame-numbers',
title: 'Show frame numbers of layer',
diff --git a/packages/docs/static/generated/articles-docs-options-experimental-sequence-activity-limit.png b/packages/docs/static/generated/articles-docs-options-experimental-sequence-activity-limit.png
deleted file mode 100644
index 05b9b1e73b..0000000000
Binary files a/packages/docs/static/generated/articles-docs-options-experimental-sequence-activity-limit.png and /dev/null differ
diff --git a/packages/docs/static/generated/articles-docs-options-experimental-sequence-activity.png b/packages/docs/static/generated/articles-docs-options-experimental-sequence-activity.png
deleted file mode 100644
index de4a20fc21..0000000000
Binary files a/packages/docs/static/generated/articles-docs-options-experimental-sequence-activity.png and /dev/null differ
diff --git a/packages/docs/static/generated/articles-docs-options-sequence-activity-limit.png b/packages/docs/static/generated/articles-docs-options-sequence-activity-limit.png
new file mode 100644
index 0000000000..cb7815393f
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-options-sequence-activity-limit.png differ
diff --git a/packages/jonnys-videos/remotion.config.ts b/packages/jonnys-videos/remotion.config.ts
index a401f39513..f8bb7d75ed 100644
--- a/packages/jonnys-videos/remotion.config.ts
+++ b/packages/jonnys-videos/remotion.config.ts
@@ -11,6 +11,4 @@ Config.setVideoImageFormat('jpeg');
Config.setOverwriteOutput(true);
Config.setChromiumOpenGlRenderer('angle');
Config.setDefaultPremountInSeconds(2);
-Config.setExperimentalSequenceActivityEnabled(true);
Config.setShowPremounting(false);
-Config.setExperimentalSequenceActivityLimit(-1);
diff --git a/packages/renderer/src/options/experimental-sequence-activity-limit.tsx b/packages/renderer/src/options/experimental-sequence-activity-limit.tsx
deleted file mode 100644
index aa0b2ac64f..0000000000
--- a/packages/renderer/src/options/experimental-sequence-activity-limit.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import {NoReactInternals} from 'remotion/no-react';
-import type {AnyRemotionOption} from './option';
-
-let configuredLimit: number | null = null;
-const cliFlag = 'experimental-sequence-activity-limit' as const;
-
-export const experimentalSequenceActivityLimitOption = {
- name: 'Experimental hidden Sequence Activity limit',
- addedIn: '4.0.535',
- cliFlag,
- id: cliFlag,
- description: () => (
- <>
- Limit nearby hidden scenes discovered by experimental Sequence Activity in
- the Remotion Studio, including nested sequences and their ancestors.
- Visible, premounted, and postmounted scenes always render. Defaults to 20.
- Must be a safe integer of at least -1. Set to 0 to disable hidden
- discovery, or -1 for unlimited discovery without admission delays. Only
- applies when experimental Sequence Activity is enabled. Does not affect
- rendering.
- </>
- ),
- ssrName: null,
- docLink:
- 'https://www.remotion.dev/docs/options/experimental-sequence-activity-limit',
- type: 0 as number,
- getValue: ({commandLine}) => {
- if (commandLine[cliFlag] !== undefined) {
- const value = commandLine[cliFlag];
- if (!Number.isSafeInteger(value) || (value as number) < -1) {
- throw new Error(
- 'Sequence Activity limit must be a safe integer of at least -1.',
- );
- }
-
- return {value: value as number, source: 'cli'};
- }
-
- return {
- value:
- configuredLimit ?? NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
- source: 'config',
- };
- },
- setConfig(value) {
- if (!Number.isSafeInteger(value) || value < -1) {
- throw new Error(
- 'Sequence Activity limit must be a safe integer of at least -1.',
- );
- }
-
- configuredLimit = value;
- },
- getConfigValue: () => configuredLimit,
- reset: () => {
- configuredLimit = null;
- },
-} satisfies AnyRemotionOption<number>;
diff --git a/packages/renderer/src/options/experimental-sequence-activity.tsx b/packages/renderer/src/options/experimental-sequence-activity.tsx
deleted file mode 100644
index 409a72b19d..0000000000
--- a/packages/renderer/src/options/experimental-sequence-activity.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import type {AnyRemotionOption} from './option';
-
-let experimentalSequenceActivityEnabled = false;
-let configuredExperimentalSequenceActivityEnabled: boolean | null = null;
-
-const cliFlag = 'experimental-sequence-activity' as const;
-
-export const experimentalSequenceActivityOption = {
- name: 'Enable experimental Sequence Activity',
- addedIn: '4.0.535',
- cliFlag,
- description: () => (
- <>
- Discover layers in nearby hidden scenes in the Remotion Studio before they
- become visible. This experimental feature may use more CPU. Disabled by
- default. Does not affect rendering.
- </>
- ),
- ssrName: null,
- docLink:
- 'https://www.remotion.dev/docs/options/experimental-sequence-activity',
- type: false as boolean,
- getValue: ({commandLine}) => {
- if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
- return {
- value: commandLine[cliFlag] as boolean,
- source: 'cli',
- };
- }
-
- return {
- value: experimentalSequenceActivityEnabled,
- source: 'config',
- };
- },
- setConfig(value) {
- experimentalSequenceActivityEnabled = value;
- configuredExperimentalSequenceActivityEnabled = value;
- },
- getConfigValue: () => configuredExperimentalSequenceActivityEnabled,
- reset: () => {
- experimentalSequenceActivityEnabled = false;
- configuredExperimentalSequenceActivityEnabled = null;
- },
- id: cliFlag,
-} satisfies AnyRemotionOption<boolean>;
diff --git a/packages/renderer/src/options/index.tsx b/packages/renderer/src/options/index.tsx
index 62773ec491..b9431ed2c1 100644
--- a/packages/renderer/src/options/index.tsx
+++ b/packages/renderer/src/options/index.tsx
@@ -34,8 +34,6 @@ import {enforceAudioOption} from './enforce-audio';
import {envFileOption} from './env-file';
import {everyNthFrameOption} from './every-nth-frame';
import {experimentalKeepAudioContextAliveOption} from './experimental-keep-audio-context-alive';
-import {experimentalSequenceActivityOption} from './experimental-sequence-activity';
-import {experimentalSequenceActivityLimitOption} from './experimental-sequence-activity-limit';
import {folderExpiryOption} from './folder-expiry';
import {forSeamlessAacConcatenationOption} from './for-seamless-aac-concatenation';
import {forceNewStudioOption} from './force-new-studio';
@@ -86,6 +84,7 @@ import {runsOption} from './runs';
import {sampleRateOption} from './sample-rate';
import {scaleOption} from './scale';
import {separateAudioOption} from './separate-audio';
+import {sequenceActivityLimitOption} from './sequence-activity-limit';
import {showLayerFrameNumbersOption} from './show-layer-frame-numbers';
import {showPremountingOption} from './show-premounting';
import {skipSkillsOption} from './skip-skills';
@@ -181,8 +180,7 @@ export const allOptions = {
framesOption,
forceNewStudioOption,
experimentalKeepAudioContextAliveOption,
- experimentalSequenceActivityOption,
- experimentalSequenceActivityLimitOption,
+ sequenceActivityLimitOption,
numberOfSharedAudioTagsOption,
ipv4Option,
stillImageFormatOption,
diff --git a/packages/renderer/src/options/sequence-activity-limit.tsx b/packages/renderer/src/options/sequence-activity-limit.tsx
new file mode 100644
index 0000000000..9d116dbde3
--- /dev/null
+++ b/packages/renderer/src/options/sequence-activity-limit.tsx
@@ -0,0 +1,61 @@
+import {NoReactInternals} from 'remotion/no-react';
+import type {AnyRemotionOption} from './option';
+
+let configuredLimit: number | null = null;
+const cliFlag = 'sequence-activity-limit' as const;
+
+export const sequenceActivityLimitOption = {
+ name: 'Sequence Activity limit',
+ addedIn: '4.0.536',
+ cliFlag,
+ id: cliFlag,
+ description: () => (
+ <>
+ Limit hidden scenes discovered by Sequence Activity in the Remotion
+ Studio, including nested sequences and their ancestors. Visible,
+ premounted, and postmounted scenes always render. Defaults to{' '}
+ <code>Infinity</code> for unlimited discovery without admission delays.
+ Must be a non-negative safe integer or <code>Infinity</code>. Set to 0 to
+ disable Sequence Activity. Finite limits prioritize nearby scenes. Does
+ not affect rendering.
+ </>
+ ),
+ ssrName: null,
+ docLink: 'https://www.remotion.dev/docs/options/sequence-activity-limit',
+ type: 0 as number,
+ getValue: ({commandLine}) => {
+ if (commandLine[cliFlag] !== undefined) {
+ const value =
+ commandLine[cliFlag] === 'Infinity' ? Infinity : commandLine[cliFlag];
+ if (
+ value !== Infinity &&
+ (!Number.isSafeInteger(value) || (value as number) < 0)
+ ) {
+ throw new Error(
+ 'Sequence Activity limit must be a non-negative safe integer or Infinity.',
+ );
+ }
+
+ return {value: value as number, source: 'cli'};
+ }
+
+ return {
+ value:
+ configuredLimit ?? NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
+ source: 'config',
+ };
+ },
+ setConfig(value) {
+ if (value !== Infinity && (!Number.isSafeInteger(value) || value < 0)) {
+ throw new Error(
+ 'Sequence Activity limit must be a non-negative safe integer or Infinity.',
+ );
+ }
+
+ configuredLimit = value;
+ },
+ getConfigValue: () => configuredLimit,
+ reset: () => {
+ configuredLimit = null;
+ },
+} satisfies AnyRemotionOption<number>;
diff --git a/packages/studio-server/src/test/file-source-route.test.ts b/packages/studio-server/src/test/file-source-route.test.ts
index 6ac7fabe27..e5437de2e8 100644
--- a/packages/studio-server/src/test/file-source-route.test.ts
+++ b/packages/studio-server/src/test/file-source-route.test.ts
@@ -87,8 +87,7 @@ test('serves file source from an origin-less GET request', async () => {
showLayerFrameNumbers: false,
showPremounting: null,
defaultPremountInSeconds: null,
- experimentalSequenceActivityEnabled: false,
- experimentalSequenceActivityLimit: 20,
+ sequenceActivityLimit: null,
askAIEnabled: false,
bufferStateDelayInMilliseconds: null,
canvasTabsEnabled: true,
diff --git a/packages/studio-server/src/test/update-config.test.ts b/packages/studio-server/src/test/update-config.test.ts
index d33f6c1cd1..6ba37a3bcc 100644
--- a/packages/studio-server/src/test/update-config.test.ts
+++ b/packages/studio-server/src/test/update-config.test.ts
@@ -16,8 +16,7 @@ const studioRuntimeConfig = (elementLibraryUrls: readonly string[]) => ({
showLayerFrameNumbers: false,
showPremounting: null,
defaultPremountInSeconds: null,
- experimentalSequenceActivityEnabled: false,
- experimentalSequenceActivityLimit: 20,
+ sequenceActivityLimit: null,
askAIEnabled: false,
bufferStateDelayInMilliseconds: null,
canvasTabsEnabled: true,
diff --git a/packages/studio-server/src/test/upload-output-security.test.ts b/packages/studio-server/src/test/upload-output-security.test.ts
index 91a95b3dc6..7ec1dc03be 100644
--- a/packages/studio-server/src/test/upload-output-security.test.ts
+++ b/packages/studio-server/src/test/upload-output-security.test.ts
@@ -91,8 +91,7 @@ const requestWriteRoute = async ({
showLayerFrameNumbers: false,
showPremounting: null,
defaultPremountInSeconds: null,
- experimentalSequenceActivityEnabled: false,
- experimentalSequenceActivityLimit: 20,
+ sequenceActivityLimit: null,
askAIEnabled: false,
bufferStateDelayInMilliseconds: null,
canvasTabsEnabled: true,
diff --git a/packages/studio-shared/src/config-method-lifecycles.ts b/packages/studio-shared/src/config-method-lifecycles.ts
index 43005fdba5..018ae1202a 100644
--- a/packages/studio-shared/src/config-method-lifecycles.ts
+++ b/packages/studio-shared/src/config-method-lifecycles.ts
@@ -54,8 +54,7 @@ export const configMethodLifecycles = {
setEveryNthFrame: 'runtime',
setExperimentalKeepAudioContextAlive: 'reload',
setExperimentalRspackEnabled: 'restart',
- setExperimentalSequenceActivityEnabled: 'runtime',
- setExperimentalSequenceActivityLimit: 'runtime',
+ setSequenceActivityLimit: 'runtime',
setForSeamlessAacConcatenation: 'runtime',
setForceNewStudioEnabled: 'restart',
setFrameRange: 'runtime',
diff --git a/packages/studio-shared/src/studio-runtime-config.ts b/packages/studio-shared/src/studio-runtime-config.ts
index 4baf176107..54254b5e7d 100644
--- a/packages/studio-shared/src/studio-runtime-config.ts
+++ b/packages/studio-shared/src/studio-runtime-config.ts
@@ -13,8 +13,7 @@ export type ConfigFileStudioSettings = {
readonly audioLatencyHint: AudioContextLatencyCategory | null;
readonly beepOnFinish: boolean | null;
readonly enableCrossSiteIsolation: boolean | null;
- readonly experimentalSequenceActivityEnabled: boolean | null;
- readonly experimentalSequenceActivityLimit: number | null;
+ readonly sequenceActivityLimit: number | null;
readonly interactivityEnabled: boolean | null;
readonly keyboardShortcutsEnabled: boolean | null;
readonly logLevel: LogLevel | null;
@@ -37,8 +36,8 @@ export type StudioRuntimeConfig = {
readonly maxTimelineTracks: number | null;
readonly askAIEnabled: boolean;
readonly elementLibraries?: readonly StudioElementLibrary[];
- readonly experimentalSequenceActivityEnabled: boolean;
- readonly experimentalSequenceActivityLimit: number;
+ /** null represents the unlimited (Infinity) default across JSON transport. */
+ readonly sequenceActivityLimit: number | null;
readonly interactivityEnabled: boolean;
readonly keyboardShortcutsEnabled: boolean;
readonly keyboardShortcuts?: StudioKeyboardShortcuts | null;
diff --git a/packages/studio/src/components/SequenceActivitySettingsProvider.tsx b/packages/studio/src/components/SequenceActivitySettingsProvider.tsx
index 2a4f803f59..1433cf7550 100644
--- a/packages/studio/src/components/SequenceActivitySettingsProvider.tsx
+++ b/packages/studio/src/components/SequenceActivitySettingsProvider.tsx
@@ -14,19 +14,10 @@ export const SequenceActivitySettingsProvider: React.FC<{
return;
}
- const {
- experimentalSequenceActivityEnabled,
- experimentalSequenceActivityLimit,
- } = event.studioRuntimeConfig;
- setSettings((current) =>
- current.enabled === experimentalSequenceActivityEnabled &&
- current.limit === experimentalSequenceActivityLimit
- ? current
- : {
- enabled: experimentalSequenceActivityEnabled,
- limit: experimentalSequenceActivityLimit,
- },
- );
+ const limit =
+ event.studioRuntimeConfig.sequenceActivityLimit ??
+ Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT;
+ setSettings((current) => (current.limit === limit ? current : {limit}));
});
}, []);
diff --git a/packages/studio/src/components/StudioSettings.tsx b/packages/studio/src/components/StudioSettings.tsx
index 0ef4644e55..c77e690c0b 100644
--- a/packages/studio/src/components/StudioSettings.tsx
+++ b/packages/studio/src/components/StudioSettings.tsx
@@ -53,8 +53,7 @@ const initialSettings: ConfigFileStudioSettings = {
audioLatencyHint: null,
beepOnFinish: null,
enableCrossSiteIsolation: null,
- experimentalSequenceActivityEnabled: null,
- experimentalSequenceActivityLimit: null,
+ sequenceActivityLimit: null,
interactivityEnabled: null,
keyboardShortcutsEnabled: null,
logLevel: null,
@@ -120,11 +119,11 @@ export const StudioSettings: React.FC = () => {
const [committedNumberSettings, setCommittedNumberSettings] = useState<{
numberOfSharedAudioTags: number | null;
defaultPremountInSeconds: number | null;
- experimentalSequenceActivityLimit: number | null;
+ sequenceActivityLimit: number | null;
}>({
numberOfSharedAudioTags: null,
defaultPremountInSeconds: null,
- experimentalSequenceActivityLimit: null,
+ sequenceActivityLimit: null,
});
const [editedSetters, setEditedSetters] = useState<Set<string>>(
() => new Set(),
@@ -141,9 +140,9 @@ export const StudioSettings: React.FC = () => {
studioRuntimeConfig.configFileStudioSettings ?? initialSettings,
);
setCommittedNumberSettings({
- experimentalSequenceActivityLimit:
- studioRuntimeConfig.configFileStudioSettings
- ?.experimentalSequenceActivityLimit ?? null,
+ sequenceActivityLimit:
+ studioRuntimeConfig.configFileStudioSettings?.sequenceActivityLimit ??
+ null,
defaultPremountInSeconds:
studioRuntimeConfig.configFileStudioSettings
?.defaultPremountInSeconds ?? null,
@@ -172,7 +171,7 @@ export const StudioSettings: React.FC = () => {
key:
| 'numberOfSharedAudioTags'
| 'defaultPremountInSeconds'
- | 'experimentalSequenceActivityLimit',
+ | 'sequenceActivityLimit',
value: number | null,
) => {
setSettings((current) => ({...current, [key]: value}));
@@ -184,7 +183,7 @@ export const StudioSettings: React.FC = () => {
key:
| 'numberOfSharedAudioTags'
| 'defaultPremountInSeconds'
- | 'experimentalSequenceActivityLimit',
+ | 'sequenceActivityLimit',
setter: string,
value: number | null,
) => {
@@ -222,12 +221,8 @@ export const StudioSettings: React.FC = () => {
update('setRspack', settings.rspack),
update('setInteractivityEnabled', settings.interactivityEnabled),
update(
- 'setExperimentalSequenceActivityEnabled',
- settings.experimentalSequenceActivityEnabled,
- ),
- update(
- 'setExperimentalSequenceActivityLimit',
- committedNumberSettings.experimentalSequenceActivityLimit,
+ 'setSequenceActivityLimit',
+ committedNumberSettings.sequenceActivityLimit,
),
update('setCanvasTabsEnabled', settings.canvasTabsEnabled),
update('setLogLevel', settings.logLevel),
@@ -421,9 +416,9 @@ export const StudioSettings: React.FC = () => {
/>
<div style={optionRow}>
<div style={label}>
- Sequence Activity (experimental)
+ Sequence Activity limit
<InfoBubble
- aria-label="About experimental Sequence Activity"
+ aria-label="About the Sequence Activity limit"
horizontalAlignment="right"
>
<div
@@ -434,99 +429,62 @@ export const StudioSettings: React.FC = () => {
lineHeight: 1.5,
}}
>
- Discovers layers in nearby scenes before they become visible. This
- experimental feature may use more CPU. Changes apply immediately
- and are saved in remotion.config.ts.
+ Limits nearby hidden scenes, including nested sequences and their
+ ancestors. Visible, premounted, and postmounted scenes always
+ render. Set to 0 to disable Sequence Activity. Reset for unlimited
+ discovery without admission delays. Default:{' '}
+ {Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT}.
</div>
</InfoBubble>
</div>
- <label style={rightRow} aria-label="Sequence Activity (experimental)">
- <Checkbox
- checked={settings.experimentalSequenceActivityEnabled === true}
- name="Sequence Activity (experimental)"
- onChange={(event) =>
- changeSetting(
- 'experimentalSequenceActivityEnabled',
- 'setExperimentalSequenceActivityEnabled',
- event.target.checked ? true : null,
+ <div style={{...rightRow, gap: 6}}>
+ <InputDragger
+ aria-label="Sequence Activity limit"
+ buttonStyle={{textAlign: 'right', width: 140}}
+ formatter={() =>
+ settings.sequenceActivityLimit === null
+ ? `Default (${Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT})`
+ : String(settings.sequenceActivityLimit)
+ }
+ integerOnly
+ max={Number.MAX_SAFE_INTEGER}
+ min={0}
+ onTextChange={() => undefined}
+ onValueChange={(value) =>
+ previewNumberSetting('sequenceActivityLimit', value)
+ }
+ onValueChangeEnd={(value) =>
+ commitNumberSetting(
+ 'sequenceActivityLimit',
+ 'setSequenceActivityLimit',
+ value,
)
}
+ rightAlign
+ status="ok"
+ step={1}
+ value={
+ settings.sequenceActivityLimit ??
+ Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT
+ }
/>
- </label>
- </div>
- {settings.experimentalSequenceActivityEnabled === true ? (
- <div style={optionRow}>
- <div style={label}>
- Hidden activity limit (experimental)
- <InfoBubble
- aria-label="About the hidden activity limit"
- horizontalAlignment="right"
- >
- <div
- style={{
- padding: 12,
- maxWidth: 280,
- fontSize: 14,
- lineHeight: 1.5,
- }}
- >
- Limits nearby hidden scenes, including nested sequences and
- their ancestors. Visible, premounted, and postmounted scenes
- always render. Set to 0 to disable hidden discovery, or -1 for
- unlimited discovery without admission delays. Default:{' '}
- {Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT}.
- </div>
- </InfoBubble>
- </div>
- <div style={{...rightRow, gap: 6}}>
- <InputDragger
- aria-label="Hidden activity limit (experimental)"
- buttonStyle={{textAlign: 'right', width: 140}}
- formatter={() =>
- settings.experimentalSequenceActivityLimit === null
- ? `Default (${Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT})`
- : String(settings.experimentalSequenceActivityLimit)
- }
- integerOnly
- max={Number.MAX_SAFE_INTEGER}
- min={-1}
- onTextChange={() => undefined}
- onValueChange={(value) =>
- previewNumberSetting('experimentalSequenceActivityLimit', value)
- }
- onValueChangeEnd={(value) =>
- commitNumberSetting(
- 'experimentalSequenceActivityLimit',
- 'setExperimentalSequenceActivityLimit',
- value,
- )
- }
- rightAlign
- status="ok"
- step={1}
- value={
- settings.experimentalSequenceActivityLimit ??
- Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT
- }
- />
- <Button
- disabled={settings.experimentalSequenceActivityLimit === null}
- onClick={() =>
- commitNumberSetting(
- 'experimentalSequenceActivityLimit',
- 'setExperimentalSequenceActivityLimit',
- null,
- )
- }
- size="compact"
- style={{color: LIGHT_TEXT}}
- aria-label={`Reset hidden activity limit to ${Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT}`}
- >
- <UndoIcon style={resetIcon} />
- </Button>
- </div>
+ <Button
+ disabled={settings.sequenceActivityLimit === null}
+ onClick={() =>
+ commitNumberSetting(
+ 'sequenceActivityLimit',
+ 'setSequenceActivityLimit',
+ null,
+ )
+ }
+ size="compact"
+ style={{color: LIGHT_TEXT}}
+ aria-label={`Reset hidden activity limit to ${Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT}`}
+ >
+ <UndoIcon style={resetIcon} />
+ </Button>
</div>
- ) : null}
+ </div>
<p style={sectionTitle}>Audio</p>
<ConfigSelect
diff --git a/packages/studio/src/components/Timeline/use-compact-series.ts b/packages/studio/src/components/Timeline/use-compact-series.ts
index ac961137b2..662dd25087 100644
--- a/packages/studio/src/components/Timeline/use-compact-series.ts
+++ b/packages/studio/src/components/Timeline/use-compact-series.ts
@@ -6,5 +6,8 @@ export const useCompactSeries = () => {
const activitySettings = useContext(
Internals.SequenceActivitySettingsContext,
);
- return activitySettings?.enabled === true && !getStudioShowPremounting();
+ return (
+ (activitySettings?.limit ?? Internals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT) >
+ 0 && !getStudioShowPremounting()
+ );
};
diff --git a/packages/studio/src/helpers/studio-runtime-config.ts b/packages/studio/src/helpers/studio-runtime-config.ts
index 2add2d5743..a279256c68 100644
--- a/packages/studio/src/helpers/studio-runtime-config.ts
+++ b/packages/studio/src/helpers/studio-runtime-config.ts
@@ -8,9 +8,7 @@ const defaultStudioRuntimeConfig: StudioRuntimeConfig = {
showPremounting: null,
defaultPremountInSeconds: null,
askAIEnabled: false,
- experimentalSequenceActivityEnabled: false,
- experimentalSequenceActivityLimit:
- NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
+ sequenceActivityLimit: null,
bufferStateDelayInMilliseconds: null,
defaultCodingAgent: null,
defaultEditor: null,
@@ -75,9 +73,8 @@ export const getStudioShowLayerFrameNumbers = () => {
export const getStudioSequenceActivitySettings = () => {
const config = getStudioRuntimeConfig();
return {
- enabled: config.experimentalSequenceActivityEnabled ?? false,
limit:
- config.experimentalSequenceActivityLimit ??
+ config.sequenceActivityLimit ??
NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
};
};