Search in sources :

Example 6 with DirectClientMessage

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

the class DeskShareMessageSender method processDeskShareNotifyASingleViewerEventMessage.

private void processDeskShareNotifyASingleViewerEventMessage(DeskShareNotifyASingleViewerEventMessage msg) {
    Map<String, Object> messageInfo = new HashMap<String, Object>();
    messageInfo.put("rtmpUrl", msg.streamPath);
    messageInfo.put("broadcasting", msg.broadcasting);
    messageInfo.put("width", msg.vw);
    messageInfo.put("height", msg.vh);
    String toUserId = msg.userId;
    DirectClientMessage receiver = new DirectClientMessage(msg.meetingId, toUserId, "DeskShareRTMPBroadcastNotification", messageInfo);
    service.sendMessage(receiver);
}
Also used : HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 7 with DirectClientMessage

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

the class PollingClientMessageSender method processUserVotedPollMessage.

private void processUserVotedPollMessage(String json) {
    UserVotedPollMessage msg = UserVotedPollMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("poll", msg.poll);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        DirectClientMessage b = new DirectClientMessage(msg.meetingId, msg.presenterId, "pollUserVotedMessage", message);
        service.sendMessage(b);
    }
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 8 with DirectClientMessage

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

the class PresentationClientMessageSender method processGetPresentationInfoReplyMessage.

private void processGetPresentationInfoReplyMessage(String json) {
    GetPresentationInfoReplyMessage msg = GetPresentationInfoReplyMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("meetingID", msg.meetingId);
        args.put("presenter", msg.presenter);
        args.put("presentations", msg.presentations);
        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, "getPresentationInfoReply", message);
        service.sendMessage(m);
    }
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) GetPresentationInfoReplyMessage(org.bigbluebutton.common.messages.GetPresentationInfoReplyMessage) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 9 with DirectClientMessage

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

the class PresentationClientMessageSender method processGetSlideInfoReply.

private void processGetSlideInfoReply(String json) {
    GetSlideInfoReplyMessage msg = GetSlideInfoReplyMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("meetingID", msg.meetingId);
        args.put("xOffset", msg.xOffset);
        args.put("yOffest", msg.yOffset);
        args.put("widthRatio", msg.widthRatio);
        args.put("heightRatio", msg.heightRatio);
        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, "getSlideInfoReply", message);
        service.sendMessage(m);
    }
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage) GetSlideInfoReplyMessage(org.bigbluebutton.common.messages.GetSlideInfoReplyMessage)

Example 10 with DirectClientMessage

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

the class CaptionClientMessageSender method processSendCaptionHistoryReplyMessage.

private void processSendCaptionHistoryReplyMessage(SendCaptionHistoryReplyMessage msg) {
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(msg.captionHistory));
    DirectClientMessage m = new DirectClientMessage(msg.meetingID, msg.requesterID, "sendCaptionHistoryReply", message);
    service.sendMessage(m);
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Aggregations

JsonObject (com.google.gson.JsonObject)20 HashMap (java.util.HashMap)20 DirectClientMessage (org.bigbluebutton.red5.client.messaging.DirectClientMessage)20 Gson (com.google.gson.Gson)14 BroadcastClientMessage (org.bigbluebutton.red5.client.messaging.BroadcastClientMessage)2 BroadcastLayoutMessage (org.bigbluebutton.common.messages.BroadcastLayoutMessage)1 GetCurrentLayoutReplyMessage (org.bigbluebutton.common.messages.GetCurrentLayoutReplyMessage)1 GetPresentationInfoReplyMessage (org.bigbluebutton.common.messages.GetPresentationInfoReplyMessage)1 GetSlideInfoReplyMessage (org.bigbluebutton.common.messages.GetSlideInfoReplyMessage)1 LockLayoutMessage (org.bigbluebutton.common.messages.LockLayoutMessage)1 UserEjectedFromMeetingMessage (org.bigbluebutton.common.messages.UserEjectedFromMeetingMessage)1