Welcome to the new Daily Docs. Please let us know what you think.

startRecording()

startRecording()

Compatibility:
Prebuilt
Custom

If recording is enabled for the room, starts a recording of all meeting participants that have their cams and/or mics on. Devices that are off will not be recorded. For example, if a participant's cam is off, it will not be recorded. Same goes for the mic.

Has no effect if recording is not enabled.

In order to turn on recording and listen for recording events, you'll need to be on the Scale plan. There is also a per minute recording fee. Please reach out if you have any questions about Scale.

Control "cloud-beta" recording layouts

Beta feature

Heads up! You must be running daily-js 0.21.0+ to try out the "cloud-beta" recording type.

If you're using the "cloud-beta" recording type, you can pass configuration properties to startRecording() to control the look and feel of the recording.

The options currently include:

  • height, width: Controls the resolution of the recording.
  • backgroundColor: Specifies the background color of the recording.
  • layout: an object specifying the way participants’ videos are laid out in the recording. 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 9, which is also the maximum number of cameras in a grid. The maximum may be increased at a later date.
    • "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), and "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).