updateRecording()
updateRecording({instanceId, layout})
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. Apreset
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, amax_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 asession_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 additionalvariant
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 theis_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
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.
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.