Skip to main content
Version: 0.1.x

Record Meeting - Android

VideoSDK allows you to record video & audio during the meeting. The recording files are available in developer dashboard or you can also choose to store them in your own cloud storage.

VideoSDK also allows you to configure the recording layouts in numerous ways like by simply setting different prebuilt layouts in the configuration or by providing your own custom template to do the recording according to your layout choice.

This guide will provide an overview of how to implement start and stop Meeting Recording.

important

To initiate automatic recording at the beginning of a session, simply provide the autoStartConfig feature recording during room creation. For more information on configuring the autoStartConfig, please refer to the provided documentation here.

startRecording()

startRecording() can be used to start a recording of the meeting which can be accessed from the Meeting class. This method accepts four parameters:

  • 1. webhookUrl: This would the webhook URL where you would like to listen to event happening for the recording like starting and stopping of recording. It will be triggered when the recording is completed and stored into server. Read more about webhooks here

  • 2. awsDirPath: This parameter accepts the path for the your S3 bucket where you want to store recordings to. To allow us to store recording in your S3 bucket, you will need to fill this form by providing the required values. (VideoSDK Cloud (AWS S3, Azure Blob or GCP ) Integration)

  • 3. config: This parameter will define how the meeting should be recorded.

  • 4. transcription: This parameter lets you start post transcription for the recording.

note

If you don't have a value for webhookUrl,awsDirPath or config, you should pass null in place of the missing value. If you pass null in awsDirPath parameter then by default recordings will be store on the VideoSDK's storage.

val config = JSONObject()

// Layout Configuration
val layout = JSONObject()
JsonUtils.jsonPut(layout, "type", "GRID") // "SPOTLIGHT" | "SIDEBAR", Default : "GRID"
JsonUtils.jsonPut(layout, "priority", "SPEAKER") // "PIN", Default : "SPEAKER"
JsonUtils.jsonPut(layout, "gridSize", 4) // MAX : 4
JsonUtils.jsonPut(config, "layout", layout)

// Theme of recording
JsonUtils.jsonPut(config, "theme", "DARK") // "LIGHT" | "DEFAULT"

// `mode` is used to either record video & audio both or only audio.
JsonUtils.jsonPut(config, "mode", "video-and-audio") // "audio", Default : "video-and-audio"

// Quality of recording and is only applicable to `video-and-audio` type mode.
JsonUtils.jsonPut(config, "quality", "high") // "low" | "med", Default : "med"

// This mode refers to orientation of recording.
// landscape : Record the meeting in horizontally
// portrait : Record the meeting in vertically (Best for mobile view)
JsonUtils.jsonPut(config, "orientation", "portrait") // "landscape", Default : "landscape"

// Post Transcription Configuration
val prompt = "Write summary in sections like Title, Agenda, Speakers, Action Items, Outlines, Notes and Summary"
val summaryConfig = SummaryConfig(true, prompt)
val modelId = "raman_v1"
val transcription = PostTranscriptionConfig(true, summaryConfig, modelId)

meeting.startRecording(null, null, config, transcription)

stopRecording()

  • stopRecording() is used to stop the meeting recording which can be accessed from the Meeting class.

Example

// keep track of recording
val recording = false

findViewById<View>(R.id.btnRecording).setOnClickListener { view: View? ->
if (!recording) {
val config = JSONObject()
val layout = JSONObject()
JsonUtils.jsonPut(layout, "type", "GRID")
JsonUtils.jsonPut(layout, "priority", "SPEAKER")
JsonUtils.jsonPut(layout, "gridSize", 4)
JsonUtils.jsonPut(config, "layout", layout)
JsonUtils.jsonPut(config, "theme", "DARK")
JsonUtils.jsonPut(config, "mode", "video-and-audio")
JsonUtils.jsonPut(config, "quality", "high")
JsonUtils.jsonPut(config, "orientation", "portrait")

// Post Transcription Configuration
val prompt = "Write summary in sections like Title, Agenda, Speakers, Action Items, Outlines, Notes and Summary"
val summaryConfig = SummaryConfig(true, prompt)
val modelId = "raman_v1"
val transcription = PostTranscriptionConfig(true, summaryConfig, modelId)

// Start Recording
// If you don't have a `webhookUrl` or `awsDirPath`, you should pass null.
// If you don't want to enable transcription, you can pass null as parameter.
meeting!!.startRecording("YOUR WEB HOOK URL", "AWS Directory Path", config, transcription)
} else {
// Stop Recording
meeting!!.stopRecording()
}
}

Event associated with Recording

  • onRecordingStateChanged - Whenever meeting recording state changes, then onRecordingStateChanged event will trigger.
private val meetingEventListener: MeetingEventListener = object : MeetingEventListener() {
override fun onRecordingStateChanged(recordingState: String) {
when (recordingState) {
"RECORDING_STARTING" -> {
Log.d("onRecordingStateChanged", "Meeting recording is starting")
}
"RECORDING_STARTED" -> {
Log.d("onRecordingStateChanged", "Meeting recording is started")
}
"RECORDING_STOPPING" -> {
Log.d("onRecordingStateChanged", "Meeting recording is stopping")
}
"RECORDING_STOPPED" -> {
Log.d("onRecordingStateChanged", "Meeting recording is stopped")
}
}
}
}

override fun onCreate(savedInstanceState: Bundle?) {
//...

// add listener to meeting
meeting!!.addEventListener(meetingEventListener)
}

Storage Configuration

While recording your meetings, you can choose to store them on the VideoSDK's storage or you can also configure your own AWS S3 Storage, Azure Blob or GCP Cloud Storage to store the meeting recordings directly on your storage.

You can configure your own AWS S3 Storage, Azure Blob or GCP Cloud Storage from the VideoSDK Dashboard's API section.

You can also go through this guide to setup the storage or watch this video to configure your storage.

Custom Template

With VideoSDK, you can also use your own custom designed layout template to record the meetings. In order to use the custom template, you need to create a template for which you can follow this guide. Once you have setup the template, you can use the REST API to start the recording with the templateURL parameter.

API Reference

The API references for all the methods utilised in this guide are provided below.

Got a Question? Ask us on discord