Skip to content
Snippets Groups Projects
Commit f2709d72 authored by Richard Alam's avatar Richard Alam
Browse files

- stop start recording of webcam

parent 7d08504b
No related branches found
No related tags found
No related merge requests found
......@@ -754,7 +754,7 @@ public class MeetingService implements MessageListener {
if (message.userId.startsWith("v_")) {
// A dial-in user joined the meeting. Dial-in users by convention has userId that starts with "v_".
User vuser = new User(message.userId, message.userId,
message.name, "DIAL-IN-USER", "no-avatar-url", true, false);
message.name, "DIAL-IN-USER", "no-avatar-url", true, "VOICE-USER");
vuser.setVoiceJoined(true);
m.userJoined(vuser);
}
......
......@@ -12,6 +12,8 @@ public class MeetingMessageHandler implements MessageHandler {
private final String BODY = "body";
private final String MEETING_ID = "meetingId";
private final String TIMESTAMP = "timestamp";
private final String ENVELOPE = "envelope";
private final String CORE = "core";
private final String RecordingChapterBreakSysMsg = "RecordingChapterBreakSysMsg";
......@@ -19,22 +21,24 @@ public class MeetingMessageHandler implements MessageHandler {
public void handleMessage(String pattern, String channel, String message) {
System.out.println("******* HANDLING MESSAGE " + message);
System.out.println("******* HANDLING MESSAGE \n\n" + message + "\n\n");
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has(HEADER) && obj.has(BODY)) {
JsonObject header = obj.getAsJsonObject(HEADER);
if (obj.has(ENVELOPE) && obj.has(CORE)) {
JsonObject core = obj.getAsJsonObject(CORE);
JsonObject header = core.getAsJsonObject(HEADER);
if (header.has(NAME)) {
String name = header.get(NAME).getAsString();
handle(name, obj.getAsJsonObject(BODY));
handle(name, core.getAsJsonObject(BODY));
}
}
}
private void handle(String name, JsonObject body) {
if (RecordingChapterBreakSysMsg.equals(name)) {
System.out.println("******* HANDLING RecordingChapterBreakSysMsg MESSAGE \n\n" + body + "\n\n");
if (body.has(MEETING_ID) && body.has(TIMESTAMP)) {
String meetingId = body.get(MEETING_ID).getAsString();
Long timestamp = body.get(TIMESTAMP).getAsLong();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment