From 8863a6e2b19bd8d8f6cefe9e37ab49790e1595ed Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Thu, 14 May 2020 14:37:49 +0200 Subject: [PATCH] openvidu-server: generatedCandidates to gatheredCandidates --- openvidu-node-client/src/OpenVidu.ts | 2 ++ .../kurento/endpoint/MediaEndpoint.java | 20 +++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/openvidu-node-client/src/OpenVidu.ts b/openvidu-node-client/src/OpenVidu.ts index 817b04f5..175f4533 100644 --- a/openvidu-node-client/src/OpenVidu.ts +++ b/openvidu-node-client/src/OpenVidu.ts @@ -525,6 +525,7 @@ export class OpenVidu { localCandidate: publisherExtended.localCandidate, remoteCandidate: publisherExtended.remoteCandidate, receivedCandidates: publisherExtended.receivedCandidates, + gatheredCandidates: publisherExtended.gatheredCandidates, webrtcEndpointName: publisherExtended.webrtcEndpointName, localSdp: publisherExtended.localSdp, remoteSdp: publisherExtended.remoteSdp @@ -551,6 +552,7 @@ export class OpenVidu { localCandidate: subscriberExtended.localCandidate, remoteCandidate: subscriberExtended.remoteCandidate, receivedCandidates: subscriberExtended.receivedCandidates, + gatheredCandidates: subscriberExtended.gatheredCandidates, webrtcEndpointName: subscriberExtended.webrtcEndpointName, localSdp: subscriberExtended.localSdp, remoteSdp: subscriberExtended.remoteSdp diff --git a/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java b/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java index ebf25cb6..a3e26f24 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java +++ b/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java @@ -92,7 +92,7 @@ public abstract class MediaEndpoint { private ListenerSubscription endpointSubscription = null; private final List receivedCandidateList = new LinkedList(); - private final List generatedCandidateList = new LinkedList(); + private final List gatheredCandidateList = new LinkedList(); private LinkedList candidates = new LinkedList(); public String selectedLocalIceCandidate; @@ -534,7 +534,7 @@ public abstract class MediaEndpoint { } webEndpoint.addIceCandidateFoundListener(event -> { final IceCandidate candidate = event.getCandidate(); - generatedCandidateList.add(candidate); + gatheredCandidateList.add(candidate); owner.sendIceCandidate(senderPublicId, endpointName, candidate); }); } @@ -612,17 +612,17 @@ public abstract class MediaEndpoint { } Gson gson = new GsonBuilder().create(); JsonArray receivedCandidates = new JsonArray(); - Iterator it = this.receivedCandidateList.iterator(); - while (it.hasNext()) { - receivedCandidates.add(gson.toJsonTree(it.next())); + Iterator it1 = this.receivedCandidateList.iterator(); + while (it1.hasNext()) { + receivedCandidates.add(gson.toJsonTree(it1.next())); } json.add("receivedCandidates", receivedCandidates); - JsonArray generatedCandidates = new JsonArray(); - it = this.receivedCandidateList.iterator(); - while (it.hasNext()) { - generatedCandidates.add(gson.toJsonTree(it.next())); + JsonArray gatheredCandidates = new JsonArray(); + Iterator it2 = this.gatheredCandidateList.iterator(); + while (it2.hasNext()) { + gatheredCandidates.add(gson.toJsonTree(it2.next())); } - json.add("generatedCandidates", generatedCandidates); + json.add("gatheredCandidates", gatheredCandidates); json.addProperty("localCandidate", this.selectedLocalIceCandidate); json.addProperty("remoteCandidate", this.selectedRemoteIceCandidate);