🎥 Make videos programmatically with React
in the studio
Jonny Burger5e632ea1e90b
diff --git a/packages/cli/src/editor/components/InitialCompositionLoader.tsx b/packages/cli/src/editor/components/InitialCompositionLoader.tsxindex 64f5f3c619..1a7a66358c 100644--- a/packages/cli/src/editor/components/InitialCompositionLoader.tsx+++ b/packages/cli/src/editor/components/InitialCompositionLoader.tsx@@ -23,7 +23,7 @@ export const useSelectComposition = () => {return (c: AnyComposition, push: boolean) => {inOutHandles.current?.setMarks(loadMarks(c.id, c.durationInFrames));if (push) {- window.history.pushState({}, 'Preview', `/${c.id}`);+ window.history.pushState({}, 'Studio', `/${c.id}`);}const frame = getFrameForComposition(c.id);diff --git a/packages/cli/src/index.tsx b/packages/cli/src/index.tsxindex 038f92c4fe..f7909bc352 100644--- a/packages/cli/src/index.tsx+++ b/packages/cli/src/index.tsx@@ -22,13 +22,13 @@ import {listOfRemotionPackages} from './list-of-remotion-packages';import {Log} from './log';import {makeProgressBar} from './make-progress-bar';import {BooleanFlags, parsedCli, quietFlagProvided} from './parse-command-line';-import {previewCommand} from './preview';import {printCompositions} from './print-compositions';import {printHelp} from './print-help';import {createOverwriteableCliOutput} from './progress-bar';import {render} from './render';import {shouldUseNonOverlayingLogger} from './should-use-non-overlaying-logger';import {still} from './still';+import {studioCommand} from './studio';import {upgrade} from './upgrade';import {validateVersionsBeforeCommand,@@ -59,8 +59,8 @@ export const cli = async () => {try {if (command === 'compositions') {await listCompositionsCommand(remotionRoot, args);- } else if (command === 'preview') {- await previewCommand(remotionRoot, args);+ } else if (command === 'preview' || command === 'studio') {+ await studioCommand(remotionRoot, args);} else if (command === 'lambda') {await lambdaCommand(remotionRoot, args);} else if (command === 'render') {diff --git a/packages/cli/src/preview.ts b/packages/cli/src/studio.tssimilarity index 95%rename from packages/cli/src/preview.tsrename to packages/cli/src/studio.tsindex c90f597f85..fe6be8de55 100644--- a/packages/cli/src/preview.ts+++ b/packages/cli/src/studio.ts@@ -59,16 +59,16 @@ const getPort = () => {return null;};-export const previewCommand = async (remotionRoot: string, args: string[]) => {+export const studioCommand = async (remotionRoot: string, args: string[]) => {const {file, reason} = findEntryPoint(args, remotionRoot);Log.verbose('Entry point:', file, 'reason:', reason);if (!file) {Log.error(- 'The preview command requires you to specify a root file. For example'+ 'No Remotion entrypoint was found. Specify an additional argument manually:');- Log.error(' npx remotion preview src/index.ts');+ Log.error(' npx remotion studio src/index.ts');Log.error('See https://www.remotion.dev/docs/register-root for more information.');