Back to Remotion

Remotion Studio Protocol

packages/docs/docs/studio-protocol/index.mdx

4.0.5021.6 KB
Original Source

Remotion Studio Protocol<AvailableFrom v="4.0.502" />

A versioned protocol for bringing reusable content into Remotion Studio.

Protocol v1 supports Remotion Elements from the official Remotion Elements library. It provides one Element payload that can be delivered by dragging it into Studio or by requesting installation into the active composition.

<Installation pkg="@remotion/studio-protocol" />

Usage

ts
import {
  createElementPayload,
  installInStudio,
} from '@remotion/studio-protocol';

const payload = createElementPayload({
  displayName: 'Lower Third',
  slug: 'lower-third',
  sourceCode: 'export const LowerThird = () => null;',
  dependencies: [],
  dimensions: {width: 900, height: 260},
  durationInFrames: 90,
});

const result = await installInStudio({payload});
if (result.success) {
  console.log(result.status); // "awaiting-confirmation"
}

A successful request means Studio received the Element and is awaiting confirmation. It does not mean dependencies or source files were installed.

APIs

import {TableOfContents} from './table-of-contents';

<TableOfContents />

Supported origins

Install requests are accepted from:

  • https://remotion.dev
  • https://www.remotion.dev
  • HTTP localhost
  • HTTP 127.0.0.1

Protocol v1 is supported by the official Remotion Elements library. Other hosted websites are not currently authorized to send installation requests.

Compatibility

Remotion Studio 4.0.502 or newer is required. Browser Studio is not supported in protocol v1.

License

Remotion License