Search in sources :

Example 1 with PresentationCursorUpdateMessage

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

Aggregations

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