🎥 Make videos programmatically with React
Docs: Simplify Studio Protocol overview
Jonny Burgerce79c2acdfae
diff --git a/packages/docs/docs/studio-protocol/index.mdx b/packages/docs/docs/studio-protocol/index.mdxindex 93d5218239..ce1727c562 100644--- a/packages/docs/docs/studio-protocol/index.mdx+++ b/packages/docs/docs/studio-protocol/index.mdx@@ -4,9 +4,9 @@ title: 'Remotion Studio Protocol'crumb: '@remotion/studio-protocol'----# Remotion Studio Protocol<AvailableFrom v="4.0.502" />+# @remotion/studio-protocol<AvailableFrom v="4.0.502" />-A versioned protocol for providing content to Remotion Studio.+With this package, you can create payloads for passing content to Remotion Studio.<Installation pkg="@remotion/studio-protocol" />@@ -14,28 +14,24 @@ A versioned protocol for providing content to Remotion Studio.### Installing Remotion Elements-A Remotion Element is a reusable React component distributed as source code, together with the metadata and dependencies needed to add it to a composition. Because its source code becomes part of the project, it can be edited and remixed by the user.--Websites can provide Remotion Elements by drag-and-drop, request their installation into the active composition, or open them in the browser-based editor at remotion.dev/new.+Websites can provide [Elements](/elements) to a Studio either using drag-and-drop or using an installation dialog.<Step>1</Step> Create an Element payload with [`createElementPayload()`](/docs/studio-protocol/create-element-payload).<br />-<Step>2</Step> Provide the payload to Studio: build a link to remotion.dev/new with [`buildOpenInRemotionNewUrl()`](/docs/studio-protocol/build-open-in-remotion-new-url), put it on a drag event with [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data), or request installation into the active composition with [`installInStudio()`](/docs/studio-protocol/install-in-studio).--If you publish reusable components, see [Integrating a component library with Studio](/docs/studio-protocol/component-library-integration) for recommendations on Player previews, representing components as Elements, and local Studio delivery methods.+<Step>2</Step> Put it on a drag event with [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data), or send a signal to a Studio using [`installInStudio()`](/docs/studio-protocol/install-in-studio).-The methods use the same Element payload but suit different workflows.| Method | Benefits | Tradeoffs || --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |-| [remotion.dev/new link](/docs/studio-protocol/build-open-in-remotion-new-url) | Works without a local Studio and can be used in a regular anchor element. | Opens a separate browser-based editor. The generated URL contains the Element source code. |-| [Drag-and-drop](/docs/studio-protocol/set-studio-drag-data) | The user chooses the exact Studio tab, timeline position, and canvas position. | Drag data has no reliable website provenance, so Studio labels the source as [unverified](/docs/studio-protocol/security#confirmation-boundary). |-| [Installation request](/docs/studio-protocol/install-in-studio) | The requesting website is shown in Studio. On macOS, Studio attempts to bring the target tab to the foreground. | Local Studio ports are probed and the most recently focused compatible Studio is selected automatically. |+| [Drag-and-drop](/docs/studio-protocol/set-studio-drag-data) | The user chooses the exact Studio tab, timeline position, and canvas position. | Studio labels the source as [unverified](/docs/studio-protocol/security#confirmation-boundary). |+| [Installation dialog](/docs/studio-protocol/install-in-studio) | The requesting website is shown. Remotion attempts to bring the Studio to the foreground. | Always the most recently focused Studio is taken. |### Adding Element catalogs-A website can use [`addElementLibraryToStudio()`](/docs/studio-protocol/add-element-library-to-studio) to request that its catalog is persisted in a Remotion project's config. Studio shows the requesting origin and catalog URL before changing `remotion.config.ts`.+Using [`addElementLibraryToStudio()`](/docs/studio-protocol/add-element-library-to-studio) you can request to add an element library to the Studio.++### Previewing Elements-Adding a catalog does not install Element source code or dependencies. Each Element installation keeps its own confirmation.+Using [`buildOpenInRemotionNewUrl()`](/docs/studio-protocol/build-open-in-remotion-new-url), you can open your [Element](/docs/elements) in [remotion.dev/new](https://remotion.dev/new).## APIs@@ -50,3 +46,7 @@ Learn about the [confirmation and origin policy](/docs/studio-protocol/security)## License[Remotion License](/docs/license)++## See also++- [Integrating a component library with Studio](/docs/studio-protocol/component-library-integration)