BreakoutRoomStarted event finally arrives to the client.
This commit is contained in:
parent
924a8cbefd
commit
6e9b95e347
@ -16,7 +16,6 @@ import org.bigbluebutton.common.messages.UserConnectedToGlobalAudio;
|
|||||||
import org.bigbluebutton.common.messages.UserDisconnectedFromGlobalAudio;
|
import org.bigbluebutton.common.messages.UserDisconnectedFromGlobalAudio;
|
||||||
import org.bigbluebutton.common.messages.ValidateAuthTokenMessage;
|
import org.bigbluebutton.common.messages.ValidateAuthTokenMessage;
|
||||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||||
import org.bigbluebutton.messages.BreakoutRoomStarted;
|
|
||||||
import org.bigbluebutton.messages.CreateMeetingRequest;
|
import org.bigbluebutton.messages.CreateMeetingRequest;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -23,7 +23,6 @@ import org.bigbluebutton.messages._
|
|||||||
import org.bigbluebutton.messages.payload._
|
import org.bigbluebutton.messages.payload._
|
||||||
import akka.event.Logging
|
import akka.event.Logging
|
||||||
import spray.json.JsonParser
|
import spray.json.JsonParser
|
||||||
import org.bigbluebutton.messages.BreakoutRoomStarted
|
|
||||||
|
|
||||||
class BigBlueButtonInGW(
|
class BigBlueButtonInGW(
|
||||||
val system: ActorSystem,
|
val system: ActorSystem,
|
||||||
|
@ -61,7 +61,7 @@ class JsonMessageSenderActor(val service: MessageSender)
|
|||||||
|
|
||||||
// Breakout
|
// Breakout
|
||||||
private def handleBreakoutRoomStarted(msg: BreakoutRoomStartedOutMessage) {
|
private def handleBreakoutRoomStarted(msg: BreakoutRoomStartedOutMessage) {
|
||||||
val payload = new BreakoutRoomPayload(msg.breakout.breakoutId, msg.breakout.name)
|
val payload = new BreakoutRoomPayload(msg.meetingId, msg.breakout.breakoutId, msg.breakout.name)
|
||||||
val request = new BreakoutRoomStarted(payload)
|
val request = new BreakoutRoomStarted(payload)
|
||||||
service.send(MessagingConstants.FROM_MEETING_CHANNEL, request.toJson)
|
service.send(MessagingConstants.FROM_MEETING_CHANNEL, request.toJson)
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,4 @@ object MessageNames {
|
|||||||
val KEEP_ALIVE_REPLY = "keep_alive_reply"
|
val KEEP_ALIVE_REPLY = "keep_alive_reply"
|
||||||
val USER_LISTEN_ONLY = "user_listening_only"
|
val USER_LISTEN_ONLY = "user_listening_only"
|
||||||
val GET_ALL_MEETINGS_REPLY = "get_all_meetings_reply"
|
val GET_ALL_MEETINGS_REPLY = "get_all_meetings_reply"
|
||||||
|
|
||||||
// breakout rooms
|
|
||||||
val BREAKOUT_ROOM_STARTED = "BreakoutRoomStarted"
|
|
||||||
}
|
}
|
@ -30,7 +30,6 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def handleCreateBreakoutRooms(msg: CreateBreakoutRooms) {
|
def handleCreateBreakoutRooms(msg: CreateBreakoutRooms) {
|
||||||
log.debug("## handleCreateBreakoutRooms{}", msg)
|
|
||||||
var i = 0
|
var i = 0
|
||||||
for (room <- msg.rooms) {
|
for (room <- msg.rooms) {
|
||||||
i += 1
|
i += 1
|
||||||
@ -38,7 +37,6 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
val breakoutMeetingId = BreakoutRoomsUtil.createMeetingId(mProps.meetingID, i)
|
val breakoutMeetingId = BreakoutRoomsUtil.createMeetingId(mProps.meetingID, i)
|
||||||
val voiceConfId = BreakoutRoomsUtil.createVoiceConfId(mProps.voiceBridge, i)
|
val voiceConfId = BreakoutRoomsUtil.createVoiceConfId(mProps.voiceBridge, i)
|
||||||
val r = breakoutModel.createBreakoutRoom(breakoutMeetingId, room.name, voiceConfId, room.users, presURL)
|
val r = breakoutModel.createBreakoutRoom(breakoutMeetingId, room.name, voiceConfId, room.users, presURL)
|
||||||
log.debug("## Added breakout room {}", r)
|
|
||||||
val p = new BreakoutRoomOutPayload(r.id, r.name, mProps.meetingID,
|
val p = new BreakoutRoomOutPayload(r.id, r.name, mProps.meetingID,
|
||||||
r.voiceConfId, msg.durationInMinutes, bbbWebModeratorPassword, bbbWebViewerPassword,
|
r.voiceConfId, msg.durationInMinutes, bbbWebModeratorPassword, bbbWebViewerPassword,
|
||||||
r.defaultPresentationURL)
|
r.defaultPresentationURL)
|
||||||
@ -62,11 +60,8 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def handleBreakoutRoomCreated(msg: BreakoutRoomCreated) {
|
def handleBreakoutRoomCreated(msg: BreakoutRoomCreated) {
|
||||||
log.debug("## Breakout room created {}!!!", msg)
|
val room = breakoutModel.getBreakoutRoom(msg.breakoutRoomId)
|
||||||
val rooms = breakoutModel.getBreakoutRoom(msg.breakoutRoomId)
|
room foreach { room =>
|
||||||
log.debug("## Looking in rooms {}", breakoutModel.getRooms());
|
|
||||||
log.debug("## Found rooms {} for breakoutRoomId", rooms)
|
|
||||||
rooms foreach { room =>
|
|
||||||
sendBreakoutRoomStarted(mProps.meetingID, room.name, room.id, room.voiceConfId)
|
sendBreakoutRoomStarted(mProps.meetingID, room.name, room.id, room.voiceConfId)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +73,6 @@ trait BreakoutRoomApp extends SystemConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def sendBreakoutRoomStarted(meetingId: String, breakoutName: String, breakoutId: String, voiceConfId: String) {
|
def sendBreakoutRoomStarted(meetingId: String, breakoutName: String, breakoutId: String, voiceConfId: String) {
|
||||||
log.debug("## Sending BreakoutRoomStartedOutMessage for {}", meetingId)
|
|
||||||
outGW.send(new BreakoutRoomStartedOutMessage(meetingId, mProps.recorded, new BreakoutRoomBody(breakoutName, breakoutId)))
|
outGW.send(new BreakoutRoomStartedOutMessage(meetingId, mProps.recorded, new BreakoutRoomBody(breakoutName, breakoutId)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import org.bigbluebutton.core.messaging.Util
|
|||||||
import org.bigbluebutton.core.api._
|
import org.bigbluebutton.core.api._
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import scala.collection.JavaConverters._
|
import scala.collection.JavaConverters._
|
||||||
|
import org.bigbluebutton.messages._
|
||||||
|
|
||||||
object MeetingMessageToJsonConverter {
|
object MeetingMessageToJsonConverter {
|
||||||
def meetingDestroyedToJson(msg: MeetingDestroyed): String = {
|
def meetingDestroyedToJson(msg: MeetingDestroyed): String = {
|
||||||
@ -132,10 +133,11 @@ object MeetingMessageToJsonConverter {
|
|||||||
|
|
||||||
def breakoutRoomStartedOutMessageToJson(msg: BreakoutRoomStartedOutMessage): String = {
|
def breakoutRoomStartedOutMessageToJson(msg: BreakoutRoomStartedOutMessage): String = {
|
||||||
val payload = new java.util.HashMap[String, Any]()
|
val payload = new java.util.HashMap[String, Any]()
|
||||||
payload.put(Constants.MEETING_ID, msg.meetingId)
|
payload.put("meetingId", msg.meetingId)
|
||||||
payload.put("breakout", msg.breakout)
|
payload.put("breakoutId", msg.breakout.breakoutId)
|
||||||
|
payload.put("name", msg.breakout.name)
|
||||||
|
|
||||||
val header = Util.buildHeader(MessageNames.BREAKOUT_ROOM_STARTED, None)
|
val header = Util.buildHeader(BreakoutRoomStarted.NAME, None)
|
||||||
Util.buildJson(header, payload)
|
Util.buildJson(header, payload)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,13 @@ package org.bigbluebutton.messages.payload;
|
|||||||
|
|
||||||
public class BreakoutRoomPayload {
|
public class BreakoutRoomPayload {
|
||||||
|
|
||||||
public final String breakoutId;
|
public final String meetingId;
|
||||||
public final String name;
|
public final String breakoutId;
|
||||||
|
public final String name;
|
||||||
public BreakoutRoomPayload(String breakoutId, String name) {
|
|
||||||
this.breakoutId = breakoutId;
|
public BreakoutRoomPayload(String meetingId, String breakoutId, String name) {
|
||||||
this.name = name;
|
this.meetingId = meetingId;
|
||||||
}
|
this.breakoutId = breakoutId;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class UserClientMessageSender {
|
|||||||
public void handleUsersMessage(String message) {
|
public void handleUsersMessage(String message) {
|
||||||
JsonParser parser = new JsonParser();
|
JsonParser parser = new JsonParser();
|
||||||
JsonObject obj = (JsonObject) parser.parse(message);
|
JsonObject obj = (JsonObject) parser.parse(message);
|
||||||
|
|
||||||
if (obj.has("header") && obj.has("payload")) {
|
if (obj.has("header") && obj.has("payload")) {
|
||||||
JsonObject header = (JsonObject) obj.get("header");
|
JsonObject header = (JsonObject) obj.get("header");
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ public class UserClientMessageSender {
|
|||||||
if (brsm != null) {
|
if (brsm != null) {
|
||||||
processBreakoutRoomStarted(brsm);
|
processBreakoutRoomStarted(brsm);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -535,14 +535,14 @@ public class UserClientMessageSender {
|
|||||||
private void processBreakoutRoomStarted(BreakoutRoomStarted msg) {
|
private void processBreakoutRoomStarted(BreakoutRoomStarted msg) {
|
||||||
Map<String, Object> args = new HashMap<String, Object>();
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
args.put("breakoutId", msg.payload.breakoutId);
|
args.put("breakoutId", msg.payload.breakoutId);
|
||||||
|
args.put("meetingId", msg.payload.meetingId);
|
||||||
args.put("name", msg.payload.name);
|
args.put("name", msg.payload.name);
|
||||||
|
|
||||||
Map<String, Object> message = new HashMap<String, Object>();
|
Map<String, Object> message = new HashMap<String, Object>();
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
message.put("msg", gson.toJson(args));
|
message.put("msg", gson.toJson(args));
|
||||||
|
|
||||||
// FIXME : we need the meetingId in addition of breakoutId
|
BroadcastClientMessage m = new BroadcastClientMessage(msg.payload.meetingId, "breakoutRoomStarted", message);
|
||||||
BroadcastClientMessage m = new BroadcastClientMessage(msg.payload.breakoutId, "updateBreakoutUsers", message);
|
|
||||||
service.sendMessage(m);
|
service.sendMessage(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,6 @@ import org.bigbluebutton.api.messaging.messages.UserListeningOnly;
|
|||||||
import org.bigbluebutton.api.messaging.messages.UserSharedWebcam;
|
import org.bigbluebutton.api.messaging.messages.UserSharedWebcam;
|
||||||
import org.bigbluebutton.api.messaging.messages.UserStatusChanged;
|
import org.bigbluebutton.api.messaging.messages.UserStatusChanged;
|
||||||
import org.bigbluebutton.api.messaging.messages.UserUnsharedWebcam;
|
import org.bigbluebutton.api.messaging.messages.UserUnsharedWebcam;
|
||||||
import org.bigbluebutton.messages.BreakoutRoomStarted;
|
|
||||||
import org.bigbluebutton.messages.payload.BreakoutRoomPayload;
|
import org.bigbluebutton.messages.payload.BreakoutRoomPayload;
|
||||||
import org.bigbluebutton.presentation.PresentationUrlDownloadService;
|
import org.bigbluebutton.presentation.PresentationUrlDownloadService;
|
||||||
import org.bigbluebutton.web.services.ExpiredMeetingCleanupTimerTask;
|
import org.bigbluebutton.web.services.ExpiredMeetingCleanupTimerTask;
|
||||||
|
Loading…
Reference in New Issue
Block a user