openvidu-server: IPCAM participants id format changed

pull/391/head
pabloFuente 2020-01-29 18:01:53 +01:00
parent 8084acefcd
commit 1f139b8211
3 changed files with 7 additions and 5 deletions

View File

@ -146,7 +146,7 @@ public class Participant {
}
public boolean isIpcam() {
return this.platform.equals("IPCAM") && this.participantPrivatetId.startsWith("IPCAM-");
return this.platform.equals("IPCAM") && this.participantPrivatetId.startsWith("ipc_");
}
public String getPublisherStreamId() {

View File

@ -899,9 +899,11 @@ public class KurentoSessionManager extends SessionManager {
location = null;
}
final String rtspConnectionId = "ipc_" + kMediaOptions.getTypeOfVideo() + "-" + protocol + "-"
+ RandomStringUtils.randomAlphanumeric(4).toLowerCase() + "-" + url.getAuthority()
+ url.getPath().replaceAll("/", "-").replaceAll("_", "-");
String rtspConnectionId = kMediaOptions.getTypeOfVideo() + "_" + protocol + "_"
+ RandomStringUtils.randomAlphanumeric(4).toUpperCase() + "_" + url.getAuthority()
+ url.getPath();
rtspConnectionId = rtspConnectionId.replace("/", "_").replace("-", "").replace(".", "_");
rtspConnectionId = "ipc_" + rtspConnectionId;
// Store a "fake" participant for the IpCam connection
this.newInsecureParticipant(rtspConnectionId);

View File

@ -151,7 +151,7 @@ public class RpcNotificationService {
}
private boolean isIpcamParticipant(String participantPrivateId) {
return participantPrivateId.startsWith("IPCAM-");
return participantPrivateId.startsWith("ipc_");
}
}