updateRecording()

updateRecording({instanceId, layout})

Compatibility:
Prebuilt
Custom

Update the available recording options while a recording is in progress.

Cloud recording layout updates

If you're using the "cloud" recording type, you can pass configuration properties to updateRecording() to change the layout of the recording from that point onward.

The options currently include:

  • layout: an object specifying the way participants’ videos are laid out in the live stream. A preset key with one of the following values must be provided:
    • 'default': This is the default grid layout, which renders participants in a grid, or in a vertical grid to the right, if a screen share is enabled. Optionally, a max_cam_streams integer key can be provided to specify how many cameras to include in the grid. The default value is 20, which is also the maximum number of cameras in a grid. The maximum may be increased at a later date.
    • 'audio-only': This layout creates an audio only cloud recording. Video will not be a part of the recording.
    • 'single-participant': Use this layout to limit the audio and video to be streamed to a specific participant. The selected participant’s session ID must be specified via a session_id key.
    • 'active-participant': This layout focuses on the current speaker, and places up to 9 other cameras to the right in a vertical grid in the order in which they last spoke.
    • 'portrait': Allows for mobile-friendly layouts. The video will be forced into portrait mode, where up to 2 participants will be shown. An additional variant key may be specified. Valid values are:
      • 'vertical' for a vertical grid layout (the default)
      • 'inset'for having one participant's video take up the entire screen, and the other inset in a smaller rectangle. Participants' videos are scaled and cropped to fit the entire available space. Participants with the is_owner flag are shown lower in the grid (vertical variant), or full screen (inset variant).
    • 'custom': Allows for custom layouts. (See below.)

Custom video layouts with VCS baseline composition

The baseline composition option is only available for cloud recordings and live streaming.

Daily offers a "baseline" composition option via the "custom" layout preset for customizing your video layouts while recording. This option allows for even more flexibility while using Daily's recording API.

Review our Video Component System (VCS) guide or VCS Simulator for additional information and code examples.

Many VCS properties use a "grid unit". The grid unit is a designer-friendly, device-independent unit. The default grid size is 1/36 of the output's minimum dimension. In other words, 1gu = 20px on a 720p stream and 30px on a 1080p stream. Learn more about grid units in our [VCS SDK docs](/reference/vcs/layout-api#the-grid-unit).

Baseline composition properties

See startRecording() for the full property list available.