mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: Simplify readIceServer method to load OPENVIDU_WEBRTC_ICE_SERVERS
parent
963191fe93
commit
af5efc4de4
|
@ -1192,17 +1192,12 @@ public class OpenviduConfig {
|
||||||
String url = null, username = null, credential = null;
|
String url = null, username = null, credential = null;
|
||||||
String[] iceServerPropList = iceServerString.split(",");
|
String[] iceServerPropList = iceServerString.split(",");
|
||||||
for (String iceServerProp: iceServerPropList) {
|
for (String iceServerProp: iceServerPropList) {
|
||||||
String[] iceServerPropEntry = iceServerProp.split("=");
|
|
||||||
if (iceServerPropEntry.length == 2) {
|
|
||||||
if (iceServerProp.startsWith("url=")) {
|
if (iceServerProp.startsWith("url=")) {
|
||||||
url = iceServerPropEntry[1];
|
url = StringUtils.substringAfter(iceServerProp, "url=");
|
||||||
} else if (iceServerProp.startsWith("username=")) {
|
} else if (iceServerProp.startsWith("username=")) {
|
||||||
username = iceServerPropEntry[1];
|
username = StringUtils.substringAfter(iceServerProp, "username=");
|
||||||
} else if (iceServerProp.startsWith("credential=")) {
|
} else if (iceServerProp.startsWith("credential=")) {
|
||||||
credential = iceServerPropEntry[1];
|
credential = StringUtils.substringAfter(iceServerProp, "credential=");
|
||||||
} else {
|
|
||||||
addError(property, "Wrong parameter: " + iceServerProp);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
addError(property, "Wrong parameter: " + iceServerProp);
|
addError(property, "Wrong parameter: " + iceServerProp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue