Search in sources :

Example 21 with BroadcastClientMessage

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

the class PresentationClientMessageSender method processPresentationCursorUpdate.

private void processPresentationCursorUpdate(String json) {
    PresentationCursorUpdateMessage msg = PresentationCursorUpdateMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("meetingID", msg.meetingId);
        args.put("xPercent", msg.xPercent);
        args.put("yPercent", msg.yPercent);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "PresentationCursorUpdateCommand", message);
        service.sendMessage(m);
    }
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) PresentationCursorUpdateMessage(org.bigbluebutton.common.messages.PresentationCursorUpdateMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 22 with BroadcastClientMessage

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

the class PresentationClientMessageSender method processPresentationPageGeneratedReply.

private void processPresentationPageGeneratedReply(String json) {
    PresentationPageGeneratedReplyMessage msg = PresentationPageGeneratedReplyMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("presentationID", msg.presentationId);
        args.put("meetingID", msg.meetingId);
        args.put("code", msg.code);
        args.put("messageKey", msg.messageKey);
        args.put("presentationName", msg.presentationName);
        args.put("pagesCompleted", msg.pagesCompleted);
        args.put("numberOfPages", msg.numPages);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "generatedSlideUpdateMessageCallback", message);
        service.sendMessage(m);
    }
}
Also used : PresentationPageGeneratedReplyMessage(org.bigbluebutton.common.messages.PresentationPageGeneratedReplyMessage) BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 23 with BroadcastClientMessage

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

the class PresentationClientMessageSender method processPresentationPageResized.

private void processPresentationPageResized(String json) {
    PresentationPageResizedMessage msg = PresentationPageResizedMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("id", msg.page.get("id"));
        args.put("num", msg.page.get("num"));
        args.put("current", msg.page.get("current"));
        args.put("swfUri", msg.page.get("swf_uri"));
        args.put("txtUri", msg.page.get("txt_uri"));
        args.put("svgUri", msg.page.get("svg_uri"));
        args.put("thumbUri", msg.page.get("thumb_uri"));
        args.put("xOffset", msg.page.get("x_offset"));
        args.put("yOffset", msg.page.get("y_offset"));
        args.put("widthRatio", msg.page.get("width_ratio"));
        args.put("heightRatio", msg.page.get("height_ratio"));
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "moveCallback", message);
        service.sendMessage(m);
    }
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) PresentationPageResizedMessage(org.bigbluebutton.common.messages.PresentationPageResizedMessage) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 24 with BroadcastClientMessage

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

the class PresentationClientMessageSender method processGoToSlideMessage.

private void processGoToSlideMessage(String json) {
    GoToSlideReplyMessage msg = GoToSlideReplyMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("id", msg.page.get(Constants.ID));
        args.put("widthRatio", msg.page.get(Constants.WIDTH_RATIO));
        args.put("yOffset", msg.page.get(Constants.Y_OFFSET));
        args.put("xOffset", msg.page.get(Constants.X_OFFSET));
        args.put("num", msg.page.get("num"));
        args.put("heightRatio", msg.page.get(Constants.HEIGHT_RATIO));
        args.put("svgUri", msg.page.get("svg_uri"));
        args.put("thumbUri", msg.page.get("thumb_uri"));
        args.put(Constants.CURRENT, msg.page.get(Constants.CURRENT));
        args.put("txtUri", msg.page.get("txt_uri"));
        args.put("swfUri", msg.page.get("swf_uri"));
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "goToSlideCallback", 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) GoToSlideReplyMessage(org.bigbluebutton.common.messages.GoToSlideReplyMessage)

Example 25 with BroadcastClientMessage

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

the class PresentationClientMessageSender method processPresentationSharedMessage.

private void processPresentationSharedMessage(String json) {
    PresentationSharedMessage msg = PresentationSharedMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> presentation = new HashMap<String, Object>();
        presentation.put("id", msg.presentation.get("id"));
        presentation.put("name", msg.presentation.get("name"));
        presentation.put("current", msg.presentation.get("current"));
        presentation.put("pages", msg.presentation.get("pages"));
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("presentation", presentation);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "sharePresentationCallback", 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) PresentationSharedMessage(org.bigbluebutton.common.messages.PresentationSharedMessage)

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