Record Meeting - Android
Record meeting allows participants to record video & audio during the meeting. The recording files are available in the developer dashboard. Any participant can start / stop recording any time during the meeting.
This guide shows how to start and stop meeting recording.
- Start Recording - By using
startRecording()function, a participant can start meeting recording. It takeswebhookUrl,awsDirPath,configandtranscription. Passnullfor any you don't use. - Stop Recording - By using
stopRecording()function, a participant can stop meeting recording.
Start And Stop Recording
Both methods are suspend functions. Call them from a coroutine, such as lifecycleScope.launch (from androidx.lifecycle:lifecycle-runtime-ktx), and catch the VideoSDKException they throw when a call is refused or fails.
// TODO: change webhookUrl
val webhookUrl = "<webhook-url-here>"
// keep track of recording, updated in onRecordingStateChanged below
var recording = false
findViewById<View>(R.id.btnRecording).setOnClickListener { view: View? ->
lifecycleScope.launch {
try {
if (!recording) {
meeting!!.startRecording(webhookUrl, null, null, null)
} else {
meeting!!.stopRecording()
}
} catch (e: VideoSDKException) {
Log.e("VideoSDK", "Recording request failed: ${e.code} ${e.name}")
}
}
}
Events
- onRecordingStateChanged - An
onRecordingStateChangedevent will be triggered any time the recording state of a meeting changes.startRecording()returns once the request is sent, so wait forRECORDING_STARTEDbefore you show that the meeting is being recorded.
object : MeetingEventListener() {
override fun onRecordingStateChanged(recordingState: String) {
when (recordingState) {
"RECORDING_STARTING" -> {
Log.d("onRecordingStateChanged", "Meeting recording is starting")
}
"RECORDING_STARTED" -> {
recording = true
Log.d("onRecordingStateChanged", "Meeting recording is started")
}
"RECORDING_STOPPING" -> {
Log.d("onRecordingStateChanged", "Meeting recording is stopping")
}
"RECORDING_STOPPED" -> {
recording = false
Log.d("onRecordingStateChanged", "Meeting recording is stopped")
}
}
}
}
Got a Question? Ask us on discord

