🎥 Make videos programmatically with React
add docs for getComposition
Jonny Burgerd624c1b9db26
diff --git a/packages/docs/docs/get-compositions.md b/packages/docs/docs/get-compositions.mdnew file mode 100644index 0000000000..2f53947279--- /dev/null+++ b/packages/docs/docs/get-compositions.md@@ -0,0 +1,37 @@+---+title: getCompositions()+id: get-compositions+---++Gets the compositions defined in a Remotion project based on a webpack bundle. Spins up a browser with Puppeteer and evaluates the Remotion root.++```ts+const getCompositions: (bundle: string, {+ inputProps?: object | null;+ browserInstance?: puppeteer.Browser;+}) => void+```++## Arguments++### `bundle`++A string pointing to a Webpack bundle generated by `@remotion/bundler`.++### `options`++_optional_++An object containing one or more of the following options:++#### `inputProps`++Define custom props that can be retrieved using [`getInputProps()`](/docs/get-input-props) at runtime. Useful for [setting a dynamic duration or dimensions](/docs/dynamic-metadata) for your video.++#### `browserInstance`++An already open Puppeteer [`Browser`](https://pptr.dev/#?product=Puppeteer&version=main&show=api-class-browser) instance. Reusing a browser across multiple function calls can speed up the rendering process. You are responsible for opening and closing the browser yourself.++## See also++- [Server-Side rendering](/docs/ssr)diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex d84bc33209..fe4f53ca8a 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -72,6 +72,11 @@ module.exports = {"visualize-audio",],},+ {+ type: "category",+ label: "API - @remotion/renderer",+ items: ["get-compositions"],+ },"2-0-migration","license",],