useRecording
useRecording
useRecording(params?): Object
useRecording
returns the state and information of a recording in progress, along with helper functions for daily-js
recording methods.
Accepts optional callbacks for recording events.
Params (optional)
An object with the following properties:
Parameter | Required | Type | Description |
---|---|---|---|
onRecordingData | Function | Callback for the recording-data event | |
onRecordingError | Function | Callback for the recording-error event | |
onRecordingStarted | Function | Callback for the recording-started event | |
onRecordingStopped | Function | Callback for the recording-stopped event |
Return type
An object with the following properties:
Name | Type | Description |
---|---|---|
error | boolean | true in the event of a recording-error |
isLocalParticipantRecorded | boolean | Indicates whether the local participant is recorded |
isRecording | boolean | Returns true if the call is being recorded |
layout | Object | Describes any preset recording layout, and any corresponding layout-specific details. Defaults to undefined |
local | boolean | true for local recordings |
recordingId | string | A unique id for the recording object |
recordingStartedDate | Date | Timestamp for when the recording started |
startedBy | string | Identifies the participant who started the recording |
startRecording | Function | See daily-js startRecording() |
stopRecording | Function | See daily-js stopRecording() |
type | string | Details the Daily recording type used for the recording |
updateRecording | Function | See daily-js updateRecording() |