- need to notify parent meeting of user join and leave to get listen in to work
This commit is contained in:
parent
b1b00aa070
commit
05054e4875
@ -2,12 +2,16 @@ package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.SystemConfiguration
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.models.Users2x
|
||||
import org.bigbluebutton.core.api.{ BreakoutRoomUsersUpdateInternalMsg, SendBreakoutUsersAuditInternalMsg }
|
||||
import org.bigbluebutton.core.bus.{ BigBlueButtonEvent, InternalEventBus }
|
||||
import org.bigbluebutton.core.domain.{ BreakoutUser, BreakoutVoiceUser }
|
||||
import org.bigbluebutton.core.models.{ Users2x, VoiceUsers }
|
||||
import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter }
|
||||
|
||||
trait BreakoutHdlrHelpers extends SystemConfiguration {
|
||||
val liveMeeting: LiveMeeting
|
||||
val outGW: OutMsgRouter
|
||||
val eventBus: InternalEventBus
|
||||
|
||||
def sendJoinURL(userId: String, externalMeetingId: String, roomSequence: String, breakoutId: String) {
|
||||
for {
|
||||
@ -47,4 +51,19 @@ trait BreakoutHdlrHelpers extends SystemConfiguration {
|
||||
outGW.send(msgEvent)
|
||||
|
||||
}
|
||||
|
||||
def updateParentMeetingWithUsers(): Unit = {
|
||||
|
||||
val users = Users2x.findAll(liveMeeting.users2x)
|
||||
val breakoutUsers = users map { u => new BreakoutUser(u.extId, u.name) }
|
||||
|
||||
val voiceUsers = VoiceUsers.findAll(liveMeeting.voiceUsers)
|
||||
val breakoutVoiceUsers = voiceUsers map { vu => BreakoutVoiceUser(vu.intId, vu.intId, vu.voiceUserId) }
|
||||
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
liveMeeting.props.breakoutProps.parentId,
|
||||
new BreakoutRoomUsersUpdateInternalMsg(liveMeeting.props.breakoutProps.parentId, liveMeeting.props.meetingProp.intId,
|
||||
breakoutUsers, breakoutVoiceUsers)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.core.api.{ BreakoutRoomUsersUpdateInternalMsg, SendBreakoutUsersAuditInternalMsg }
|
||||
import org.bigbluebutton.core.bus.BigBlueButtonEvent
|
||||
import org.bigbluebutton.core.domain.{ BreakoutUser, BreakoutVoiceUser }
|
||||
import org.bigbluebutton.core.models.{ Users2x, VoiceUser2x, VoiceUsers }
|
||||
import org.bigbluebutton.core.api.{ SendBreakoutUsersAuditInternalMsg }
|
||||
import org.bigbluebutton.core.running.{ MeetingActor, OutMsgRouter }
|
||||
|
||||
trait SendBreakoutUsersUpdateMsgHdlr {
|
||||
@ -13,16 +10,6 @@ trait SendBreakoutUsersUpdateMsgHdlr {
|
||||
|
||||
def handleSendBreakoutUsersUpdateInternalMsg(msg: SendBreakoutUsersAuditInternalMsg): Unit = {
|
||||
|
||||
val users = Users2x.findAll(liveMeeting.users2x)
|
||||
val breakoutUsers = users map { u => new BreakoutUser(u.extId, u.name) }
|
||||
|
||||
val voiceUsers = VoiceUsers.findAll(liveMeeting.voiceUsers)
|
||||
val breakoutVoiceUsers = voiceUsers map { vu => BreakoutVoiceUser(vu.intId, vu.intId, vu.voiceUserId) }
|
||||
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
props.breakoutProps.parentId,
|
||||
new BreakoutRoomUsersUpdateInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId,
|
||||
breakoutUsers, breakoutVoiceUsers)
|
||||
))
|
||||
updateParentMeetingWithUsers()
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,24 @@
|
||||
package org.bigbluebutton.core.apps.users
|
||||
|
||||
import org.bigbluebutton.common2.msgs.UserJoinMeetingReqMsg
|
||||
import org.bigbluebutton.core.apps.breakout.BreakoutHdlrHelpers
|
||||
import org.bigbluebutton.core.domain.MeetingState2x
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, HandlerHelpers, LiveMeeting, OutMsgRouter }
|
||||
|
||||
trait UserJoinMeetingReqMsgHdlr extends HandlerHelpers {
|
||||
trait UserJoinMeetingReqMsgHdlr extends HandlerHelpers with BreakoutHdlrHelpers {
|
||||
this: BaseMeetingActor =>
|
||||
|
||||
val liveMeeting: LiveMeeting
|
||||
val outGW: OutMsgRouter
|
||||
|
||||
def handleUserJoinMeetingReqMsg(msg: UserJoinMeetingReqMsg, state: MeetingState2x): MeetingState2x = {
|
||||
userJoinMeeting(outGW, msg.body.authToken, liveMeeting, state)
|
||||
val newState = userJoinMeeting(outGW, msg.body.authToken, liveMeeting, state)
|
||||
|
||||
if (liveMeeting.props.meetingProp.isBreakout) {
|
||||
updateParentMeetingWithUsers()
|
||||
}
|
||||
|
||||
newState
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -57,6 +57,10 @@ trait UserLeaveReqMsgHdlr {
|
||||
}
|
||||
}
|
||||
|
||||
if (liveMeeting.props.meetingProp.isBreakout) {
|
||||
updateParentMeetingWithUsers()
|
||||
}
|
||||
|
||||
if (Users2x.numUsers(liveMeeting.users2x) == 0) {
|
||||
val tracker = state.expiryTracker.setLastUserLeftOn(TimeUtil.timeNowInMs())
|
||||
state.update(tracker)
|
||||
|
@ -1,11 +1,12 @@
|
||||
package org.bigbluebutton.core.apps.voice
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.apps.breakout.BreakoutHdlrHelpers
|
||||
import org.bigbluebutton.core.models.{ VoiceUser2x, VoiceUserState, VoiceUsers }
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, OutMsgRouter }
|
||||
import org.bigbluebutton.core2.MeetingStatus2x
|
||||
|
||||
trait UserJoinedVoiceConfEvtMsgHdlr {
|
||||
trait UserJoinedVoiceConfEvtMsgHdlr extends BreakoutHdlrHelpers {
|
||||
this: BaseMeetingActor =>
|
||||
|
||||
val liveMeeting: LiveMeeting
|
||||
@ -44,6 +45,10 @@ trait UserJoinedVoiceConfEvtMsgHdlr {
|
||||
|
||||
broadcastEvent(voiceUserState)
|
||||
|
||||
if (liveMeeting.props.meetingProp.isBreakout) {
|
||||
updateParentMeetingWithUsers()
|
||||
}
|
||||
|
||||
startRecordingVoiceConference()
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package org.bigbluebutton.core.apps.voice
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.apps.breakout.BreakoutHdlrHelpers
|
||||
import org.bigbluebutton.core.models.{ VoiceUserState, VoiceUsers }
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, MeetingActor, OutMsgRouter }
|
||||
import org.bigbluebutton.core2.MeetingStatus2x
|
||||
|
||||
trait UserLeftVoiceConfEvtMsgHdlr {
|
||||
trait UserLeftVoiceConfEvtMsgHdlr extends BreakoutHdlrHelpers {
|
||||
this: BaseMeetingActor =>
|
||||
|
||||
val liveMeeting: LiveMeeting
|
||||
@ -33,6 +34,10 @@ trait UserLeftVoiceConfEvtMsgHdlr {
|
||||
broadcastEvent(user)
|
||||
}
|
||||
|
||||
if (liveMeeting.props.meetingProp.isBreakout) {
|
||||
updateParentMeetingWithUsers()
|
||||
}
|
||||
|
||||
stopRecordingVoiceConference()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user