useRecording(params?): Object
Accepts optional callbacks for recording events.
When multiple recordings are running concurrently (see multi-instance recording), you can pass an instanceId to get per-instance state. Without instanceId, the hook returns aggregate state across all instances. For a list of all active instances, see useRecordingInstances.
Parameters (optional)
An object with the following properties:string
A valid UUID. When provided, returns state for a specific recording instance and filters event callbacks to only fire for that instance. See multi-instance recording.
Function
Callback for the
recording-error event.Function
Callback for the
recording-started event.Function
Callback for the
recording-stopped event.Return value
An object with the following properties:Without instanceId (aggregate state)
When called without instanceId, the hook returns aggregate state across all recording instances. This works well for single-instance use cases — the scalar fields (layout, recordingId, etc.) reflect the only active instance. With multiple concurrent instances, these fields reflect the first active instance; use useRecording({ instanceId }) for unambiguous per-instance access.
boolean
true if any instance has a recording-error. With multiple instances, use useRecording({ instanceId }) for per-instance error state.boolean
true if the local participant is recorded by any instance.boolean
true if any recording instance is active.Object
Layout of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance layout.boolean
true for local recordings.string
Recording ID of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance recording ID.Date
Start date of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance start date.string
Starter of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance starter.Function
See
daily-js startRecording().Function
See
daily-js stopRecording().string
Recording type of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance type.Function
See
daily-js updateRecording().With instanceId (per-instance state)
When called with instanceId, the hook returns state for that specific recording instance only.
boolean
true if this instance has a recording error.string
Error message for this instance, if any.
string
The instance ID.
boolean
Whether the local participant is recorded by this instance.
boolean
Whether this instance is currently recording.
Object
The recording layout for this instance.
boolean
true if this is a local recording.string
The recording ID for this instance.
Date
When this instance started recording.
string
Who started this recording instance.
Function
See
daily-js startRecording().Function
See
daily-js stopRecording().string
The recording type for this instance.
Function
See
daily-js updateRecording().