Skip to main content

TypeScript Types Reference

warning

Experimental package: We reserve the right to make breaking changes in order to correct bad design decisions until this notice is gone.

The following types are part of the API of @remotion/vercel:

VercelSandbox

import type {VercelSandbox} from '@remotion/vercel';
(alias) type VercelSandbox = Sandbox & AsyncDisposable import VercelSandbox

A Sandbox with AsyncDisposable support. Returned by createSandbox().

CreateSandboxOnProgress

import type {CreateSandboxOnProgress} from '@remotion/vercel';
(alias) type CreateSandboxOnProgress = (update: { progress: number; message: string; }) => Promise<void> | void import CreateSandboxOnProgress
  • progress: A number from 0 to 1 indicating overall progress
  • message: A human-readable description of the current phase

RenderMediaOnVercelProgress

import type {RenderMediaOnVercelProgress} from '@remotion/vercel';
(alias) type RenderMediaOnVercelProgress = { stage: "opening-browser"; overallProgress: number; } | { stage: "selecting-composition"; overallProgress: number; } | { stage: "render-progress"; progress: RenderMediaProgress; overallProgress: number; } import RenderMediaOnVercelProgress

A discriminated union (on stage) with the following members:

  • {stage: 'opening-browser', overallProgress: number} - The browser is being opened.
  • {stage: 'selecting-composition', overallProgress: number} - The composition is being selected.
  • {stage: 'render-progress', progress: RenderMediaProgress, overallProgress: number} - The render is in progress. The progress field contains the same fields as RenderMediaProgress.

Every variant includes overallProgress — a number from 0 to 1 representing the weighted overall progress.

Used as the onProgress callback type for renderMediaOnVercel().

RenderMediaProgress

See RenderMediaOnProgress in @remotion/renderer.

RenderProgressv4.0.469

import type {RenderProgress} from '@remotion/vercel';
(alias) type RenderProgress = { stage: "starting"; overallProgress: number; } | RenderMediaOnVercelProgress | { stage: "uploading"; overallProgress: number; } | { stage: "done"; url: string; size: number; contentType: string; overallProgress: number; } | { stage: "error"; message: string; overallProgress: number; } | { stage: "expired"; } import RenderProgress

A discriminated union (on stage) returned by getRenderProgress().

  • {stage: 'starting', overallProgress: number} - The sandbox command started, but no progress file exists yet.
  • {stage: 'opening-browser', overallProgress: number} - The browser is being opened.
  • {stage: 'selecting-composition', overallProgress: number} - The composition is being selected.
  • {stage: 'render-progress', progress: RenderMediaProgress, overallProgress: number} - The render is in progress.
  • {stage: 'uploading', overallProgress: number} - The rendered video is being uploaded to Vercel Blob.
  • {stage: 'done', url: string, size: number, contentType: string, overallProgress: number} - The render finished and was uploaded.
  • {stage: 'error', message: string, overallProgress: number} - The render failed.
  • {stage: 'expired'} - The sandbox no longer exists.

RenderStillOnVercelProgress

import type {RenderStillOnVercelProgress} from '@remotion/vercel';
(alias) type RenderStillOnVercelProgress = { stage: "opening-browser"; overallProgress: number; } | { stage: "selecting-composition"; overallProgress: number; } import RenderStillOnVercelProgress

A discriminated union (on stage) with the following members:

  • {stage: 'opening-browser', overallProgress: number} - The browser is being opened.
  • {stage: 'selecting-composition', overallProgress: number} - The composition is being selected.

Every variant includes overallProgress — a number from 0 to 1 representing the weighted overall progress.

Used as the onProgress callback type for renderStillOnVercel().

VercelBlobAccess

import type {VercelBlobAccess} from '@remotion/vercel';
(alias) type VercelBlobAccess = "public" | "private" import VercelBlobAccess

Either "public" or "private". Used as the access parameter for uploadToVercelBlob().

VercelBlobUploadOptionsv4.0.469

import type {VercelBlobUploadOptions} from '@remotion/vercel';
(alias) type VercelBlobUploadOptions = { blobToken: string; access: VercelBlobAccess; blobPath?: string; } import VercelBlobUploadOptions

Used by renderMediaOnVercel({detached: true}) to upload the render from inside the sandbox.

blobToken

A Vercel Blob read-write token.

access

Either "public" or "private".

blobPath?

The path where the file should be stored in Vercel Blob. Default: A random path under renders/.