Search in sources :

Example 1 with PresentationPageResizedMessage

use of org.bigbluebutton.common.messages.PresentationPageResizedMessage 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)

Aggregations

Gson (com.google.gson.Gson)1 JsonObject (com.google.gson.JsonObject)1 HashMap (java.util.HashMap)1 PresentationPageResizedMessage (org.bigbluebutton.common.messages.PresentationPageResizedMessage)1 BroadcastClientMessage (org.bigbluebutton.red5.client.messaging.BroadcastClientMessage)1