Recording Events - Android
VideoSDK provides onRecordingStateChanged
event which will notify you of the current state of recording for the meeting.
onRecordingStateChanged​
- This event will be triggered when the meeting's recording status changed.
- You can implement this method of the abstract Class
MeetingEventListener
and add the listener toMeeting
class using theaddEventListener()
method ofMeeting
Class.
Example​
Here is the usage of the event mentioned in this page.
- Kotlin
- Java
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)
}
private final MeetingEventListener meetingEventListener = new MeetingEventListener() {
@Override
public void onRecordingStateChanged(String recordingState) {
switch (recordingState) {
case "RECORDING_STARTING":
Log.d("onRecordingStateChanged", "Meeting recording is starting");
break;
case "RECORDING_STARTED":
Log.d("onRecordingStateChanged", "Meeting recording is started");
break;
case "RECORDING_STOPPING":
Log.d("onRecordingStateChanged", "Meeting recording is stopping");
break;
case "RECORDING_STOPPED":
Log.d("onRecordingStateChanged", "Meeting recording is stopped");
break;
}
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
//...
// add listener to meeting
meeting.addEventListener(meetingEventListener);
}
API Reference​
The API references for all the methods and events utilised in this guide are provided below.
Got a Question? Ask us on discord