Skip to content

πŸŽ₯ Make videos programmatically with React

Enable Code Edits

Jonny Burgera306aa3607d9
diff --git a/packages/docs/docs/studio/code-edits.mdx b/packages/docs/docs/studio/code-edits.mdx
new file mode 100644
index 0000000000..81fafe10c2
--- /dev/null
+++ b/packages/docs/docs/studio/code-edits.mdx
@@ -0,0 +1,43 @@
+---
+image: /generated/articles-docs-studio-code-edits.png
+title: Code Edits
+crumb: "Remotion Studio"
+---
+
+The Studio does support some ways to edit your codebase visually.
+
+## Changing props of `<Sequence>`'s
+
+Some props of [`<Sequence>`](/docs/sequence)'s can be changed visually through the Studio.
+Some other components which inherit from `<Sequence>`, such as [`<Video>`](/docs/media/video), [`<Audio>`](/docs/media/audio), [`<Img>`](/docs/img) and [`<HtmlInCanvas>`](/docs/remotion/html-in-canvas) also allow this.
+
+<img src="/code-edits.png" alt="Code Edits" />
+
+When a value is changed, the value is written back to the codebase immediately.
+
+All `<Sequence>`'s which are in the same location are updated.
+If in the code, sequences are programmatically duplicated (such as by calling `.map()`) on an array, all instances receive the same update.
+
+Edits can be undone by pressing <kbd>⌘/Ctrl</kbd> + <kbd>Z</kbd> in the Studio.
+Redo can also be performed by pressing <kbd>⌘/Ctrl</kbd> + <kbd>Y</kbd> in the Studio.
+
+Prop updates bypass Fast Refresh for reduced latency and are synced to other instances of the Studio once the drag sliders are released.
+
+If the code is being edited in the meanwhile, the undo stack is being cleared.
+
+### Future plans
+
+It is not yet possible:
+
+- to enable these controls for your own components
+- to edit [`from`](/docs/sequence#from), [`durationInFrames`](/docs/sequence#durationinframes) of a `<Sequence>` and [`trimBefore`](/docs/media/video#trimbefore) and [`trimAfter`](/docs/media/video#trimafter) of a [`<Video>`](/docs/media/video)
+
+We plan to add this functionality in the future.
+
+## Duplicating and deleting sequences
+
+You can right-click on a sequence in the timeline and select `Duplicate` or `Delete` to duplicate or delete the sequence.
+
+<img src="/renaming-sequences.png" />
+
+If multiple sequences are in the same location, all will be duplicated or deleted. In this case, a dialog will be shown asking you to confirm.
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index 5be042cc71..0b895b2252 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1196,6 +1196,7 @@ const sidebars: SidebarsConfig = {
'studio/studio',
'studio/shortcuts',
'studio/quick-switcher',
+ 'studio/code-edits',
'studio/deploy-static',
'studio/deploy-server',
],
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 50266fbdce..843feb786f 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -5781,6 +5781,15 @@ export const articles = [
noAi: false,
slug: 'studio/api',
},
+ {
+ id: 'studio/code-edits',
+ title: 'Code Edits',
+ relativePath: 'docs/studio/code-edits.mdx',
+ compId: 'articles-docs-studio-code-edits',
+ crumb: 'Remotion Studio',
+ noAi: false,
+ slug: 'studio/code-edits',
+ },
{
id: 'studio/delete-static-file',
title: 'deleteStaticFile()',
diff --git a/packages/docs/static/code-edits.png b/packages/docs/static/code-edits.png
new file mode 100644
index 0000000000..ce8a5098f4
Binary files /dev/null and b/packages/docs/static/code-edits.png differ
diff --git a/packages/docs/static/generated/articles-docs-studio-code-edits.png b/packages/docs/static/generated/articles-docs-studio-code-edits.png
new file mode 100644
index 0000000000..d083658a0d
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-studio-code-edits.png differ
diff --git a/packages/docs/static/renaming-sequences.png b/packages/docs/static/renaming-sequences.png
new file mode 100644
index 0000000000..4e341c704b
Binary files /dev/null and b/packages/docs/static/renaming-sequences.png differ