Skip to main content

Room recording

Records the whole room, composed into one file. start requires a live session. To stop the recording, pass the value returned by start to stop, or simply pass the room id.

const rec = await client.recordings.start(roomId, {
composition: { layout: "grid", quality: "high" },
fileFormat: "mp4",
});

await client.recordings.stop(rec); // or client.recordings.stop(roomId)

Only the roomId passed to start is required. Everything below is optional. Pass it when the described behavior applies to your case.

OptionDescription
compositionControls the recording's layout and rendering (grid, spotlight, quality, and so on). See Composition. Defaults are applied if you omit it.
transcriptionGenerates a transcription, and optionally a summary, after the recording finishes. Pass it when you want a transcript of the meeting.
onFailureWhat to do if the composition fails while recording. Pass it when you need explicit failure handling instead of the default.
fileFormatOutput file format: mp4 (default) or webm. Pass it when you need webm.
webhookUrlYour endpoint to receive status updates (started, stopped, uploaded) for this recording. Pass it when you want to be notified instead of polling.
dirPathPath prefix for the output files in storage. Pass it to organize recordings under your own folder structure.
resourceIdId of a recording resource you reserved ahead of time. A recording normally allocates a resource on demand, which adds a short start-up delay. Passing a pre-reserved resource removes that delay, so recording begins immediately. Available on Enterprise plans with resource pooling.
preSignedUrlA pre-signed URL to upload the finished file to your own storage instead of VideoSDK's. Pass it when you store recordings in your own bucket.

Manage finished recordings:

await client.recordings.list({ roomId, withTranscription: true });
await client.recordings.get(recordingId, { withTranscription: true });
await client.recordings.delete(recordingId);

The recording object

recordings.list and get return this object.

FieldTypeDescription
idstringRecording id.
roomIdstringRoom this recording belongs to.
fileobjectOutput file (contains fileUrl).
webhookobjectWebhook delivery summary.
startstringStart time (ISO-8601).
endstringEnd time, null while still recording.
linksobjectRelated resource links.

Composition

The composition option controls the layout and rendering of the recorded video. Provide a named layout or a custom template URL.

FieldValues
layoutgrid, spotlight, sidebar, or a custom template URL
prioritySPEAKER or PIN
gridSizetiles in grid, 0-25 (default 25)
orientationportrait or landscape
themeDARK, LIGHT, or DEFAULT
qualitylow, med, high, or ultra

There is no resolution option. Use quality.

Got a Question? Ask us on discord