Implemented EndAllBreakoutRooms in akka-bbb-apps
This commit is contained in:
parent
48844648ee
commit
6ad3b315ee
@ -63,6 +63,9 @@ object JsonMessageDecoder {
|
|||||||
case RequestBreakoutJoinURL.NAME => {
|
case RequestBreakoutJoinURL.NAME => {
|
||||||
msg.payload.convertTo[RequestBreakoutJoinURLInMessage]
|
msg.payload.convertTo[RequestBreakoutJoinURLInMessage]
|
||||||
}
|
}
|
||||||
|
case EndAllBreakoutRoomsRequest.NAME => {
|
||||||
|
msg.payload.convertTo[EndAllBreakoutRooms]
|
||||||
|
}
|
||||||
case _ => throw MessageProcessException("Cannot parse JSON message: [" + msg + "]")
|
case _ => throw MessageProcessException("Cannot parse JSON message: [" + msg + "]")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,6 +163,7 @@ class MeetingActor(val mProps: MeetingProperties,
|
|||||||
case msg: RequestBreakoutJoinURLInMessage => liveMeeting.handleRequestBreakoutJoinURL(msg)
|
case msg: RequestBreakoutJoinURLInMessage => liveMeeting.handleRequestBreakoutJoinURL(msg)
|
||||||
case msg: BreakoutRoomUsersUpdate => liveMeeting.handleBreakoutRoomUsersUpdate(msg)
|
case msg: BreakoutRoomUsersUpdate => liveMeeting.handleBreakoutRoomUsersUpdate(msg)
|
||||||
case msg: SendBreakoutUsersUpdate => liveMeeting.handleSendBreakoutUsersUpdate(msg)
|
case msg: SendBreakoutUsersUpdate => liveMeeting.handleSendBreakoutUsersUpdate(msg)
|
||||||
|
case msg: EndAllBreakoutRooms => liveMeeting.handleEndAllBreakoutRooms(msg)
|
||||||
|
|
||||||
case msg: ExtendMeetingDuration => liveMeeting.handleExtendMeetingDuration(msg)
|
case msg: ExtendMeetingDuration => liveMeeting.handleExtendMeetingDuration(msg)
|
||||||
case msg: SendTimeRemainingUpdate => liveMeeting.handleSendTimeRemainingUpdate(msg)
|
case msg: SendTimeRemainingUpdate => liveMeeting.handleSendTimeRemainingUpdate(msg)
|
||||||
|
@ -5,6 +5,7 @@ import org.bigbluebutton.core.api.BreakoutRoomInPayload
|
|||||||
import org.bigbluebutton.core.api.CreateBreakoutRooms
|
import org.bigbluebutton.core.api.CreateBreakoutRooms
|
||||||
import org.bigbluebutton.core.api.InMessageHeader
|
import org.bigbluebutton.core.api.InMessageHeader
|
||||||
import org.bigbluebutton.core.api.RequestBreakoutJoinURLInMessage
|
import org.bigbluebutton.core.api.RequestBreakoutJoinURLInMessage
|
||||||
|
import org.bigbluebutton.core.api.EndAllBreakoutRooms
|
||||||
|
|
||||||
object UserMessagesProtocol extends DefaultJsonProtocol {
|
object UserMessagesProtocol extends DefaultJsonProtocol {
|
||||||
/*
|
/*
|
||||||
@ -30,6 +31,7 @@ object UserMessagesProtocol extends DefaultJsonProtocol {
|
|||||||
implicit val breakoutRoomInPayloadFormat = jsonFormat2(BreakoutRoomInPayload)
|
implicit val breakoutRoomInPayloadFormat = jsonFormat2(BreakoutRoomInPayload)
|
||||||
implicit val createBreakoutRoomsFormat = jsonFormat3(CreateBreakoutRooms)
|
implicit val createBreakoutRoomsFormat = jsonFormat3(CreateBreakoutRooms)
|
||||||
implicit val requestBreakoutJoinURLInMessageFormat = jsonFormat3(RequestBreakoutJoinURLInMessage)
|
implicit val requestBreakoutJoinURLInMessageFormat = jsonFormat3(RequestBreakoutJoinURLInMessage)
|
||||||
|
implicit val endBreakoutRoomsFormat = jsonFormat1(EndAllBreakoutRooms)
|
||||||
implicit val inMsgHeaderFormat = jsonFormat1(InMessageHeader)
|
implicit val inMsgHeaderFormat = jsonFormat1(InMessageHeader)
|
||||||
implicit val outMsgHeaderFormat = jsonFormat1(OutMsgHeader)
|
implicit val outMsgHeaderFormat = jsonFormat1(OutMsgHeader)
|
||||||
implicit val outMsgEnvelopeHeaderFormat = jsonFormat2(OutMsgEnvelopeHeader)
|
implicit val outMsgEnvelopeHeaderFormat = jsonFormat2(OutMsgEnvelopeHeader)
|
||||||
|
@ -54,6 +54,8 @@ case class BreakoutRoomUsersUpdate(meetingId: String, breakoutId: String,
|
|||||||
users: Vector[BreakoutUser]) extends InMessage
|
users: Vector[BreakoutUser]) extends InMessage
|
||||||
// Send by internal actor to tell the breakout actor to send it's list of users to the main meeting actor.
|
// Send by internal actor to tell the breakout actor to send it's list of users to the main meeting actor.
|
||||||
case class SendBreakoutUsersUpdate(meetingId: String) extends InMessage
|
case class SendBreakoutUsersUpdate(meetingId: String) extends InMessage
|
||||||
|
// Sent by user to request ending all the breakout rooms
|
||||||
|
case class EndAllBreakoutRooms(meetingId: String) extends InMessage
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Lock
|
// Lock
|
||||||
|
@ -56,6 +56,7 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def handleRequestBreakoutJoinURL(msg: RequestBreakoutJoinURLInMessage) {
|
def handleRequestBreakoutJoinURL(msg: RequestBreakoutJoinURLInMessage) {
|
||||||
|
log.debug("$$ Received RequestBreakoutJoinURLInMessage: {}", msg.userId)
|
||||||
sendJoinURL(msg.userId, msg.breakoutId)
|
sendJoinURL(msg.userId, msg.breakoutId)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
|
|
||||||
breakoutModel.getAssignedUsers(msg.breakoutRoomId) foreach { users =>
|
breakoutModel.getAssignedUsers(msg.breakoutRoomId) foreach { users =>
|
||||||
users.foreach { u =>
|
users.foreach { u =>
|
||||||
log.debug("## Sending Join URL for users: {}", u);
|
log.debug("## Sending Join URL for users: {} for breakout room {}", u, msg.breakoutRoomId);
|
||||||
sendJoinURL(u, msg.breakoutRoomId)
|
sendJoinURL(u, msg.breakoutRoomId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,6 +90,14 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
eventBus.publish(BigBlueButtonEvent(mProps.externalMeetingID,
|
eventBus.publish(BigBlueButtonEvent(mProps.externalMeetingID,
|
||||||
new BreakoutRoomUsersUpdate(mProps.externalMeetingID, mProps.meetingID, breakoutUsers)))
|
new BreakoutRoomUsersUpdate(mProps.externalMeetingID, mProps.meetingID, breakoutUsers)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def handleEndAllBreakoutRooms(msg: EndAllBreakoutRooms) {
|
||||||
|
breakoutModel.getRooms().foreach { room =>
|
||||||
|
eventBus.publish(BigBlueButtonEvent(room.id,
|
||||||
|
new EndMeeting(room.id)))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object BreakoutRoomsUtil {
|
object BreakoutRoomsUtil {
|
||||||
|
Loading…
Reference in New Issue
Block a user