Recording
The meeting.recording
object can be used start and stop recordings in a
meeting. You can also get the current status of a recording using this API.
The meeting.recording
object has the following properties:
recordingState
: Indicates the current recording state of the meeting.
Start a recording
To start a recording, you can call the start
method in the meeting.recording
object. The valid states are IDLE
, STARTING
, RECORDING
, and STOPPING
.
meeting.recording.start();
Stop a recording
Call meeting.recording.stop()
to stop the active recording.
meeting.recording.stop();
Pause a recording
Call meeting.recording.pause()
to pause the active recording.
meeting.recording.pause();
Resume a paused recording
Call meeting.recording.resume()
to resume the paused recording.
meeting.recording.resume();
Get active recording state
The meeting.recording.recordingState
property describes the current state of
the recording. The valid states are IDLE
, STARTING
, RECORDING
, and
STOPPING
.
Listen to recording state changes
The changes to meeting.recording.recordingState
can be listened by
implementing onMeetingRecordingStateUpdated
from
DyteMeetingRoomEventsListener
. You can attach this observer by calling
meeting.addMeetingRoomEventsListener(listener)
.
meeting.addMeetingRoomEventsListener(object : DyteMeetingRoomEventsListener {
override fun onMeetingRecordingStarted() {
super.onMeetingRecordingStarted()
// on recording started
}
override fun onMeetingRecordingEnded() {
super.onMeetingRecordingEnded()
// on recording ended
}
override fun onMeetingRecordingStateUpdated(state: DyteRecordingState) {
super.onMeetingRecordingStateUpdated(state)
// on recording state update
}
override fun onMeetingRecordingStopError(e: Exception) {
super.onMeetingRecordingStopError(e)
// when local user tried to end recording but it fails
}
})