mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: fix recordingStarted notification on COMPOSED_QUICK_START
parent
0308855535
commit
b921bac370
|
@ -437,18 +437,19 @@ public class SessionEventsHandler {
|
|||
}
|
||||
|
||||
public void sendRecordingStartedNotification(Session session, Recording recording) {
|
||||
if (recording.recordingNotificationSent.compareAndSet(false, true)) {
|
||||
// Filter participants by roles according to "OPENVIDU_RECORDING_NOTIFICATION"
|
||||
Set<Participant> filteredParticipants = this.filterParticipantsByRole(
|
||||
this.openviduConfig.getRolesFromRecordingNotification(), session.getParticipants());
|
||||
|
||||
// Filter participants by roles according to "OPENVIDU_RECORDING_NOTIFICATION"
|
||||
Set<Participant> filteredParticipants = this.filterParticipantsByRole(
|
||||
this.openviduConfig.getRolesFromRecordingNotification(), session.getParticipants());
|
||||
JsonObject params = new JsonObject();
|
||||
params.addProperty(ProtocolElements.RECORDINGSTARTED_ID_PARAM, recording.getId());
|
||||
params.addProperty(ProtocolElements.RECORDINGSTARTED_NAME_PARAM, recording.getName());
|
||||
|
||||
JsonObject params = new JsonObject();
|
||||
params.addProperty(ProtocolElements.RECORDINGSTARTED_ID_PARAM, recording.getId());
|
||||
params.addProperty(ProtocolElements.RECORDINGSTARTED_NAME_PARAM, recording.getName());
|
||||
|
||||
for (Participant p : filteredParticipants) {
|
||||
rpcNotificationService.sendNotification(p.getParticipantPrivateId(),
|
||||
ProtocolElements.RECORDINGSTARTED_METHOD, params);
|
||||
for (Participant p : filteredParticipants) {
|
||||
rpcNotificationService.sendNotification(p.getParticipantPrivateId(),
|
||||
ProtocolElements.RECORDINGSTARTED_METHOD, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package io.openvidu.server.recording;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import io.openvidu.java.client.RecordingLayout;
|
||||
|
@ -38,6 +40,8 @@ public class Recording {
|
|||
private boolean hasVideo = true;
|
||||
private RecordingProperties recordingProperties;
|
||||
|
||||
public AtomicBoolean recordingNotificationSent = new AtomicBoolean(false);
|
||||
|
||||
public Recording(String sessionId, String id, RecordingProperties recordingProperties) {
|
||||
this.sessionId = sessionId;
|
||||
this.createdAt = System.currentTimeMillis();
|
||||
|
|
|
@ -273,7 +273,7 @@ public class RecordingManager {
|
|||
this.cdr.recordRecordingStatusChanged(recording, null, recording.getCreatedAt(),
|
||||
Status.started);
|
||||
|
||||
if (!(RecordingUtils.IS_COMPOSED(properties.outputMode()) && properties.hasVideo())) {
|
||||
if (!(OutputMode.COMPOSED.equals(properties.outputMode()) && properties.hasVideo())) {
|
||||
// Directly send recording started notification for all cases except for
|
||||
// COMPOSED recordings with video (will be sent on first RECORDER subscriber)
|
||||
this.sessionHandler.sendRecordingStartedNotification(session, recording);
|
||||
|
|
Loading…
Reference in New Issue