Skip to main content
Version: 3.x.x

Webhooks and Events - Android

Event associated with Recording​

  • onRecordingStateChanged - Whenever the recording state changes, onRecordingStateChanged is triggered with a RecordingState. liveStream.recordingState holds the latest state. It is RECORDING_STOPPED until the first event, and again after you leave the room.
private val roomEventListener: RoomEventListener = object : RoomEventListener() {
override fun onRecordingStateChanged(state: RecordingState) {
when (state) {
RecordingState.RECORDING_STARTING -> {
Log.d("onRecordingStateChanged", "Room recording is starting")
}
RecordingState.RECORDING_STARTED -> {
Log.d("onRecordingStateChanged", "Room recording is started")
}
RecordingState.RECORDING_STOPPING -> {
Log.d("onRecordingStateChanged", "Room recording is stopping")
}
RecordingState.RECORDING_STOPPED -> {
Log.d("onRecordingStateChanged", "Room recording is stopped")
}
}
}
}

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

// add listener to room
liveStream!!.addEventListener(roomEventListener)
}

Webhook associated with Recording​

recording-starting​

  • A "Recording Starting" webhook is triggered when the recording process for a room is initiated.
Example​
{
"webhookType": "recording-starting",
"data": {
"meetingId": "jvsg-8rjn-j304",
"sessionId": "613731342f27f56e4fc4b6d0"
}
}

recording-started​

  • A "Recording Started" webhook is received when recording has started successfully in the room.
Example​
{
"webhookType": "recording-started",
"data": {
"meetingId": "jvsg-8rjn-j304",
"sessionId": "613731342f27f56e4fc4b6d0"
}
}

recording-stopping​

  • A "Recording Stopping" webhook is triggered when the recording end process for a room is initiated.
Example​
{
"webhookType": "recording-stopping",
"data": {
"meetingId": "jvsg-8rjn-j304",
"sessionId": "613731342f27f56e4fc4b6d0"
}
}

recording-stopped​

  • A "Recording Stopped" webhook is received when the recording has stopped. fileUrl is where you download the file.
Example​
{
"webhookType": "recording-stopped",
"data": {
"meetingId": "jvsg-8rjn-j304",
"sessionId": "613731342f27f56e4fc4b6d0",
"filePath" : "/encoded/videos/62d148951a1eb20029fc9b05.mp4",
"fileUrl" : "https://cdn.videosdk.live/encoded/videos/62d148951a1eb20029fc9b05.mp4"
}
}

recording-failed​

  • A "Recording Failed" webhook is generated when the recording process encounters an interruption or issue during either the starting or stopping phases.
Example​
{
"webhookType": "recording-failed",
"data": {
"meetingId": "jvsg-8rjn-j304",
"sessionId": "613731342f27f56e4fc4b6d0"
}
}

Got a Question? Ask us on discord