🎥 Make videos programmatically with React
Skills: Keep caption data inline
JonnyBurgerecb2b402edf7
diff --git a/packages/skills/skills/remotion-captions/display-captions.md b/packages/skills/skills/remotion-captions/display-captions.mdindex 74fae89403..1bee82282b 100644--- a/packages/skills/skills/remotion-captions/display-captions.md+++ b/packages/skills/skills/remotion-captions/display-captions.md@@ -33,9 +33,12 @@ Fetch its source code from https://www.remotion.dev/elements/captions/basic-capt## Displaying captions alongside video content-Put the captions next to the video so they stay in sync. Inline the captions-directly in the `captions` prop; if they were transcribed to a JSON file, copy-its contents into the prop.+Put the captions next to the video so they stay in sync. The Caption editor+writes back to the array literal on the selected `<BasicCaptions>` source node,+so inline the captions directly in its `captions` prop. Passing a variable or+component prop such as `captions={captions}` leaves no source array for the+editor to update. If the captions were transcribed to a JSON file, copy its+contents into the prop.Give the caption area a width and position it over the video. In this1920px-wide composition, the 900px caption area is centered by translating itdiff --git a/packages/skills/skills/remotion-markup/compositions.md b/packages/skills/skills/remotion-markup/compositions.mdindex 4320f93782..bd5aa772d8 100644--- a/packages/skills/skills/remotion-markup/compositions.md+++ b/packages/skills/skills/remotion-markup/compositions.md@@ -59,6 +59,11 @@ Pass `defaultProps` to provide initial values for your component.Values must be JSON-serializable (`Date`, `Map`, `Set`, and `staticFile()` are supported).Use `defaultProps` for composition-wide values that should be visible and editable before the video renders.+Keep data owned by a child editor on that child's JSX node. For example,+captions that should remain editable in the Caption editor belong as an inline+array on `<BasicCaptions>`, not in composition `defaultProps` or a component+prop. See [Displaying captions](../remotion-captions/display-captions.md).+For Studio editing, keep `defaultProps` as an inline object literal on `<Composition>` or `<Still>`.Keep values that should be written back directly in the object instead of deriving them from a loop variable.Do not store it in a variable, import it, spread it, create it with a helper, or wrap it in `satisfies`.