Skip to main content
Paid plans only startRecording(options?) If server-side recording (cloud) is enabled for the room, starts a recording of all meeting participants that have their cams and/or mics on. Devices that are off are not recorded. Requires recording to be enabled for the room. Multiple recording sessions can run concurrently (up to max_streaming_instances_per_room on your domain) if each is started with a unique instanceId.

Parameters

options?: DailyStreamingOptions All fields are optional. See DailyStreamingOptions for the full list of shared options: output quality (width, height, fps, videoBitrate, audioBitrate, backgroundColor), session lifetime (instanceId, minIdleTimeOut, maxDuration), output artifacts (dataOutputs), and layout. The type field is recording-specific:
type
'cloud' | 'cloud-audio-only' | 'raw-tracks'
default:"'cloud'"
Recording type:
  • 'cloud' — cloud recording with video composition (default)
  • 'cloud-audio-only' — cloud recording, audio only; no video composition charges
  • 'raw-tracks' — individual uncomposed audio/video tracks per participant

Return value

Returns void. Listen for recording-started to confirm the recording is active.

Examples

// Start a cloud recording at 720p
await call.startRecording({
  width: 1280,
  height: 720,
  fps: 25,
  layout: {
    preset: 'default',
    max_cam_streams: 5,
  },
});

Audio-only recording

If you know ahead of time that video is not needed, use cloud-audio-only to avoid video composition charges. You can also set the recording type at the room level so that startRecording() requires no arguments.
await call.startRecording({
  type: 'cloud-audio-only',
});
You can also use the audio-only layout preset with a standard cloud recording to select specific participants’ audio:
await call.startRecording({
  layout: {
    preset: 'audio-only',
    participants: {
      audio: ['user-id-of-participant-1', 'user-id-of-participant-2'],
    },
  },
});

Raw tracks (audio only)

await call.startRecording({
  layout: {
    preset: 'raw-tracks-audio-only',
  },
});

Custom layout with VCS baseline composition

await call.startRecording({
  layout: {
    preset: 'custom',
    composition_id: 'daily:baseline',
    composition_params: {
      mode: 'dominant',
      'videoSettings.preferScreenshare': true,
    },
    session_assets: {
      'images/logo': 'https://example.com/logo.png',
    },
  },
});
See DailyStreamingLayoutConfig for all layout presets and the full VCS baseline composition parameter reference.

See also