openvidu-server: fix uncaught exception in Token class

pull/739/head
pabloFuente 2022-06-10 11:57:04 +02:00
parent b102a44d50
commit c6e3875ceb
1 changed files with 16 additions and 7 deletions

View File

@ -17,18 +17,23 @@
package io.openvidu.server.core; package io.openvidu.server.core;
import com.google.gson.JsonArray; import java.net.MalformedURLException;
import io.openvidu.java.client.*; import java.util.List;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import com.google.gson.JsonArray;
import com.google.gson.JsonNull; import com.google.gson.JsonNull;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import io.openvidu.java.client.ConnectionProperties;
import io.openvidu.java.client.ConnectionType;
import io.openvidu.java.client.IceServerProperties;
import io.openvidu.java.client.KurentoOptions;
import io.openvidu.java.client.OpenViduRole;
import io.openvidu.server.core.Participant.ParticipantStatus; import io.openvidu.server.core.Participant.ParticipantStatus;
import io.openvidu.server.coturn.TurnCredentials; import io.openvidu.server.coturn.TurnCredentials;
import java.util.List;
public class Token { public class Token {
private String token; private String token;
@ -212,7 +217,11 @@ public class Token {
builder.kurentoOptions(kurentoOptions); builder.kurentoOptions(kurentoOptions);
} }
if (rtspUri != null) { if (rtspUri != null) {
builder.rtspUri(rtspUri); try {
builder.rtspUri(rtspUri);
} catch (MalformedURLException e) {
e.printStackTrace();
}
} }
if (adaptativeBitrate != null) { if (adaptativeBitrate != null) {
builder.adaptativeBitrate(adaptativeBitrate); builder.adaptativeBitrate(adaptativeBitrate);
@ -224,7 +233,7 @@ public class Token {
builder.networkCache(networkCache); builder.networkCache(networkCache);
} }
if (iceServerProperties != null) { if (iceServerProperties != null) {
for (IceServerProperties customIceServer: iceServerProperties) { for (IceServerProperties customIceServer : iceServerProperties) {
builder.addCustomIceServer(customIceServer); builder.addCustomIceServer(customIceServer);
} }
} }