Skip to content

Commit 5ccd6f5

Browse files
committed
Reverting to original janus logic
1 parent 2614363 commit 5ccd6f5

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/main/java/org/spacehub/service/VoiceRoom/JanusService.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,7 @@ public void joinAudioRoom(String sessionId, String handleId, int roomId, String
119119
"janus", "message", "transaction", UUID.randomUUID().toString(), "body", body
120120
);
121121
String handleUrl = String.format("%s/%s/%s", janusUrl, sessionId, handleId);
122-
123-
ResponseEntity<JsonNode> response = restTemplate.postForEntity(handleUrl, request, JsonNode.class);
124-
logger.info("Janus join response: {}", response.getBody());
125-
}
126-
127-
public JsonNode listParticipants(String sessionId, String handleId, int roomId) {
128-
Map<String, Object> body = Map.of(
129-
"request", "listparticipants", "room", roomId
130-
);
131-
Map<String, Object> request = Map.of(
132-
"janus", "message", "transaction", UUID.randomUUID().toString(), "body", body
133-
);
134-
String handleUrl = String.format("%s/%s/%s", janusUrl, sessionId, handleId);
135-
136-
ResponseEntity<JsonNode> response = restTemplate.postForEntity(handleUrl, request, JsonNode.class);
137-
138-
if (response.getBody() != null) {
139-
return response.getBody().path("plugindata").path("data").path("list");
140-
}
141-
142-
throw new RuntimeException("Failed to get participant list from Janus");
122+
restTemplate.postForEntity(handleUrl, request, JsonNode.class);
143123
}
144124

145125
public void sendOffer(String sessionId, String handleId, String sdpOffer,

0 commit comments

Comments
 (0)