Search in sources :

Example 16 with BroadcastClientMessage

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

the class CaptionClientMessageSender method processEditCaptionHistoryMessage.

private void processEditCaptionHistoryMessage(EditCaptionHistoryMessage msg) {
    Map<String, Object> message = new HashMap<String, Object>();
    message.put(Constants.START_INDEX, msg.startIndex);
    message.put(Constants.END_INDEX, msg.endIndex);
    message.put(Constants.LOCALE, msg.locale);
    message.put(Constants.LOCALE_CODE, msg.localeCode);
    message.put(Constants.TEXT, msg.text);
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingID, "editCaptionHistory", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject)

Example 17 with BroadcastClientMessage

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

the class ChatClientMessageSender method processSendPublicChatMessage.

private void processSendPublicChatMessage(SendPublicChatMessage msg) {
    Map<String, Object> messageInfo = new HashMap<String, Object>();
    messageInfo.put(ChatKeyUtil.CHAT_TYPE, msg.messageInfo.get(ChatKeyUtil.CHAT_TYPE));
    messageInfo.put(ChatKeyUtil.FROM_USERID, msg.messageInfo.get(ChatKeyUtil.FROM_USERID));
    messageInfo.put(ChatKeyUtil.FROM_USERNAME, msg.messageInfo.get(ChatKeyUtil.FROM_USERNAME));
    messageInfo.put(ChatKeyUtil.TO_USERID, msg.messageInfo.get(ChatKeyUtil.TO_USERID));
    messageInfo.put(ChatKeyUtil.TO_USERNAME, msg.messageInfo.get(ChatKeyUtil.TO_USERNAME));
    messageInfo.put(ChatKeyUtil.FROM_TIME, msg.messageInfo.get(ChatKeyUtil.FROM_TIME));
    messageInfo.put(ChatKeyUtil.FROM_TZ_OFFSET, msg.messageInfo.get(ChatKeyUtil.FROM_TZ_OFFSET));
    messageInfo.put(ChatKeyUtil.FROM_COLOR, msg.messageInfo.get(ChatKeyUtil.FROM_COLOR));
    messageInfo.put(ChatKeyUtil.MESSAGE, msg.messageInfo.get(ChatKeyUtil.MESSAGE));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "ChatReceivePublicMessageCommand", messageInfo);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject)

Example 18 with BroadcastClientMessage

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

the class WhiteboardClientMessageSender method processIsWhiteboardEnabledReply.

private void processIsWhiteboardEnabledReply(IsWhiteboardEnabledReplyMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("enabled", msg.enabled);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.requesterId, "WhiteboardIsWhiteboardEnabledReply", message);
    service.sendMessage(m);
    // broadcast message
    BroadcastClientMessage b = new BroadcastClientMessage(msg.meetingId, "WhiteboardIsWhiteboardEnabledReply", message);
    service.sendMessage(b);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 19 with BroadcastClientMessage

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

the class WhiteboardClientMessageSender method processSendWhiteboardAnnotationReplyMessage.

private void processSendWhiteboardAnnotationReplyMessage(SendWhiteboardAnnotationReplyMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("whiteboardId", msg.whiteboardId);
    Map<String, Object> shape = new HashMap<String, Object>();
    shape.put("id", msg.shape.get("id"));
    shape.put("type", msg.shape.get("type"));
    shape.put("status", msg.shape.get("status"));
    shape.put("shape", msg.shape.get("shapes"));
    args.put("shape", shape);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    //broadcast message
    BroadcastClientMessage b = new BroadcastClientMessage(msg.meetingId, "WhiteboardNewAnnotationCommand", message);
    service.sendMessage(b);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 20 with BroadcastClientMessage

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

the class WhiteboardClientMessageSender method processClearWhiteboardReply.

private void processClearWhiteboardReply(ClearWhiteboardReplyMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("whiteboardId", msg.whiteboardId);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "WhiteboardClearCommand", 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