createSandbox()v4.0.425
Creates a new Vercel Sandbox with all Remotion dependencies installed, including system libraries, the compositor, a browser, and your Remotion bundle.
This is a lower-level API. For most use cases, prefer getOrCreateSandbox() which handles dev/prod routing automatically.
Example
const sandbox = await createSandbox ({
bundleDir : '.remotion',
onProgress : ({progress , message }) => {
console .log (`${message } (${Math .round (progress * 100)}%)`);
},
});Arguments
An object with the following properties:
bundleDir
The path to your Remotion bundle directory, relative to the current working directory. This is the output of npx remotion bundle.
onProgress?
A callback that receives progress updates during sandbox creation.
type OnProgress = (update: {
progress: number; // 0 to 1
message: string; // Human-readable phase description
}) => void;Return value
A VercelSandbox object (a Sandbox with AsyncDisposable support). You can use await using to automatically clean up the sandbox when it goes out of scope.