From 16ccaae2687e181c1abce9cf07ce26c593f2f7aa Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 1 Mar 2019 16:19:27 +0100 Subject: [PATCH] openvidu-server: source property removed from MediaEndpoint KMS events info --- .../openvidu/server/kurento/endpoint/MediaEndpoint.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 5173d835..76e8e251 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 @@ -212,7 +212,10 @@ public abstract class MediaEndpoint { } public String getEndpointName() { - return endpointName != null ? endpointName : this.getEndpoint().getName(); + if (endpointName == null) { + endpointName = this.getEndpoint().getName(); + } + return endpointName; } public void setEndpointName(String endpointName) { @@ -487,7 +490,7 @@ public abstract class MediaEndpoint { public JsonObject withStatsToJson() { JsonObject json = new JsonObject(); json.addProperty("createdAt", this.createdAt); - json.addProperty("webrtcEndpointName", this.getEndpoint().getName()); + json.addProperty("webrtcEndpointName", this.getEndpointName()); json.addProperty("remoteSdp", this.getEndpoint().getRemoteSessionDescriptor()); json.addProperty("localSdp", this.getEndpoint().getLocalSessionDescriptor()); json.add("receivedCandidates", new GsonBuilder().create().toJsonTree(this.receivedCandidateList)); @@ -500,8 +503,6 @@ public abstract class MediaEndpoint { JsonArray jsonArray = new JsonArray(); for (KmsEvent event : this.kmsEvents) { JsonObject jsonKmsEvent = JsonUtils.toJsonObject(event.event); - // Set source name - jsonKmsEvent.addProperty("source", event.endpoint); // Set custom more precise timestamp jsonKmsEvent.addProperty("timestamp", event.timestamp); // Set milliseconds since the Publisher or Subscriber started transmitting media