diff --git a/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java b/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java index 03d3068926..685c0d34cf 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java +++ b/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java @@ -268,9 +268,8 @@ public Participant newParticipant(String sessionId, String participantPrivatetId public Participant newRecorderParticipant(String sessionId, String participantPrivatetId, Token token, String clientMetadata) { if (this.sessionidParticipantpublicidParticipant.get(sessionId) != null) { - String participantPublicId = ProtocolElements.RECORDER_PARTICIPANT_PUBLICID; - Participant p = new Participant(participantPrivatetId, participantPublicId, token, clientMetadata); - this.sessionidParticipantpublicidParticipant.get(sessionId).put(participantPublicId, p); + Participant p = new Participant(participantPrivatetId, ProtocolElements.RECORDER_PARTICIPANT_PUBLICID, token, clientMetadata); + this.sessionidParticipantpublicidParticipant.get(sessionId).put(ProtocolElements.RECORDER_PARTICIPANT_PUBLICID, p); return p; } else { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, sessionId); diff --git a/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java b/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java index 483df48a52..493555fd15 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java +++ b/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java @@ -233,7 +233,10 @@ public void publishVideo(Participant participant, MediaOptions mediaOptions, Int && RecordingMode.ALWAYS.equals(session.getSessionProperties().recordingMode()) && !recordingService.sessionIsBeingRecorded(session.getSessionId()) && session.getActivePublishers() == 0) { - recordingService.startRecording(session, null); + // Insecure session recording + new Thread(() -> { + recordingService.startRecording(session, null); + }).start(); } session.newPublisher(participant);