diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/AudioFloorChangedRecordEvent.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/AudioFloorChangedRecordEvent.scala new file mode 100644 index 0000000000..8e97ea92d4 --- /dev/null +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/AudioFloorChangedRecordEvent.scala @@ -0,0 +1,44 @@ +/** + * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ + * + * Copyright (c) 2022 BigBlueButton Inc. and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BigBlueButton; if not, see . + * + */ + +package org.bigbluebutton.core.record.events + +class AudioFloorChangedRecordEvent extends AbstractVoiceRecordEvent { + import AudioFloorChangedRecordEvent._ + + setEvent("AudioFloorChangedEvent") + + def setParticipant(p: String) { + eventMap.put(PARTICIPANT, p) + } + + def setFloor(floor: Boolean) { + eventMap.put(FLOOR, floor.toString) + } + + def setLastFloorTime(lastFloorTime: String) { + eventMap.put(LAST_FLOOR_TIME, lastFloorTime) + } +} + +object AudioFloorChangedRecordEvent { + protected final val PARTICIPANT = "participant" + protected final val FLOOR = "floor" + protected final val LAST_FLOOR_TIME = "lastFloorTime" +} diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala index fa6df81aaa..56ef565191 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala @@ -98,6 +98,8 @@ class RedisRecorderActor( case m: VoiceRecordingStartedEvtMsg => handleVoiceRecordingStartedEvtMsg(m) case m: VoiceRecordingStoppedEvtMsg => handleVoiceRecordingStoppedEvtMsg(m) + case m: AudioFloorChangedEvtMsg => handleAudioFloorChangedEvtMsg(m) + // Caption case m: EditCaptionHistoryEvtMsg => handleEditCaptionHistoryEvtMsg(m) @@ -442,6 +444,17 @@ class RedisRecorderActor( record(msg.header.meetingId, ev.toMap.asJava) } + private def handleAudioFloorChangedEvtMsg(msg: AudioFloorChangedEvtMsg) { + val ev = new AudioFloorChangedRecordEvent() + ev.setMeetingId(msg.header.meetingId) + ev.setBridge(msg.body.voiceConf) + ev.setParticipant(msg.body.intId) + ev.setFloor(msg.body.floor) + ev.setLastFloorTime(msg.body.lastFloorTime) + + record(msg.header.meetingId, ev.toMap.asJava) + } + private def handleEditCaptionHistoryEvtMsg(msg: EditCaptionHistoryEvtMsg) { val ev = new EditCaptionHistoryRecordEvent() ev.setMeetingId(msg.header.meetingId)