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: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.
Callback for the
recording-error event.Callback for the
recording-started event.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.
true if any instance has a recording-error. With multiple instances, use useRecording({ instanceId }) for per-instance error state.true if the local participant is recorded by any instance.true if any recording instance is active.Layout of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance layout.true for local recordings.Recording ID of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance recording ID.Start date of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance start date.Starter of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance starter.See
daily-js startRecording().See
daily-js stopRecording().Recording type of the first active instance. With multiple instances, use
useRecording({ instanceId }) for per-instance type.See
daily-js updateRecording().With instanceId (per-instance state)
When called with instanceId, the hook returns state for that specific recording instance only.
true if this instance has a recording error.Error message for this instance, if any.
The instance ID.
Whether the local participant is recorded by this instance.
Whether this instance is currently recording.
The recording layout for this instance.
true if this is a local recording.The recording ID for this instance.
When this instance started recording.
Who started this recording instance.
See
daily-js startRecording().See
daily-js stopRecording().The recording type for this instance.
See
daily-js updateRecording().