Search in sources :

Example 26 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class UserClientMessageSender method processUserEmojiStatusMessage.

private void processUserEmojiStatusMessage(UserEmojiStatusMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("userId", msg.userId);
    args.put("emojiStatus", msg.emojiStatus);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "userEmojiStatus", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 27 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class UserClientMessageSender method processBreakoutRoomStarted.

private void processBreakoutRoomStarted(BreakoutRoomStarted msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("breakoutMeetingId", msg.payload.meetingId);
    args.put("parentMeetingId", msg.payload.parentMeetingId);
    args.put("externalMeetingId", msg.payload.externalMeetingId);
    args.put("sequence", msg.payload.sequence);
    args.put("name", msg.payload.name);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.payload.parentMeetingId, "breakoutRoomStarted", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 28 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class DeskShareMessageSender method processDeskShareNotifyViewersRTMPEventMessage.

private void processDeskShareNotifyViewersRTMPEventMessage(DeskShareNotifyViewersRTMPEventMessage msg) {
    Map<String, Object> messageInfo = new HashMap<String, Object>();
    // split the string streamPath if there are params in the format:
    // {channels=2,samplerate=48000,vw=1920,vh=1080,fps=5.00}rtmp://192.168.23.3/video-broadcast/.../..."
    String fullPathString = msg.streamPath;
    String delims = "[,{}]+";
    String[] arr = fullPathString.split(delims);
    String rtmpStreamPath = arr[arr.length - 1];
    messageInfo.put("rtmpUrl", rtmpStreamPath);
    messageInfo.put("broadcasting", msg.broadcasting);
    messageInfo.put("width", msg.vw);
    messageInfo.put("height", msg.vh);
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "DeskShareRTMPBroadcastNotification", messageInfo);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject)

Example 29 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class MeetingClientMessageSender method processMeetingMutedMessage.

private void processMeetingMutedMessage(MeetingMutedMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("meetingMuted", msg.muted);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "meetingMuted", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 30 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class MeetingClientMessageSender method processNewPermissionsSettingMessage.

private void processNewPermissionsSettingMessage(NewPermissionsSettingMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("disableCam", msg.permissions.get(Constants.PERM_DISABLE_CAM));
    args.put("disableMic", msg.permissions.get(Constants.PERM_DISABLE_MIC));
    args.put("disablePrivateChat", msg.permissions.get(Constants.PERM_DISABLE_PRIVCHAT));
    args.put("disablePublicChat", msg.permissions.get(Constants.PERM_DISABLE_PUBCHAT));
    args.put("lockedLayout", msg.permissions.get(Constants.PERM_LOCKED_LAYOUT));
    args.put("lockOnJoin", msg.permissions.get(Constants.PERM_LOCK_ON_JOIN));
    args.put("lockOnJoinConfigurable", msg.permissions.get(Constants.PERM_LOCK_ON_JOIN_CONFIG));
    args.put("users", msg.users);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "permissionsSettingsChanged", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Aggregations

JsonObject (com.google.gson.JsonObject)45 HashMap (java.util.HashMap)45 BroadcastClientMessage (org.bigbluebutton.red5.client.messaging.BroadcastClientMessage)45 Gson (com.google.gson.Gson)41 Map (java.util.Map)2 DirectClientMessage (org.bigbluebutton.red5.client.messaging.DirectClientMessage)2 SimpleDateFormat (java.text.SimpleDateFormat)1 GoToSlideReplyMessage (org.bigbluebutton.common.messages.GoToSlideReplyMessage)1 PresentationConversionDoneMessage (org.bigbluebutton.common.messages.PresentationConversionDoneMessage)1 PresentationConversionErrorMessage (org.bigbluebutton.common.messages.PresentationConversionErrorMessage)1 PresentationConversionProgressMessage (org.bigbluebutton.common.messages.PresentationConversionProgressMessage)1 PresentationCursorUpdateMessage (org.bigbluebutton.common.messages.PresentationCursorUpdateMessage)1 PresentationPageGeneratedReplyMessage (org.bigbluebutton.common.messages.PresentationPageGeneratedReplyMessage)1 PresentationPageResizedMessage (org.bigbluebutton.common.messages.PresentationPageResizedMessage)1 PresentationRemovedMessage (org.bigbluebutton.common.messages.PresentationRemovedMessage)1 PresentationSharedMessage (org.bigbluebutton.common.messages.PresentationSharedMessage)1