Merge pull request #14438 from pedrobmarin/f-e-aafc

feat(events): add audio floor change
This commit is contained in:
Anton Georgiev 2022-03-02 08:51:40 -05:00 committed by GitHub
commit de58d9c10c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 0 deletions

View File

@ -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 <http://www.gnu.org/licenses/>.
*
*/
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"
}

View File

@ -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)