diff --git a/openvidu-java-client/src/main/java/io/openvidu/java/client/RecordingProperties.java b/openvidu-java-client/src/main/java/io/openvidu/java/client/RecordingProperties.java index a76ced2c..67960d9f 100644 --- a/openvidu-java-client/src/main/java/io/openvidu/java/client/RecordingProperties.java +++ b/openvidu-java-client/src/main/java/io/openvidu/java/client/RecordingProperties.java @@ -33,6 +33,7 @@ public class RecordingProperties { private boolean hasAudio; private boolean hasVideo; private long shmSize; // For COMPOSED recording + private String mediaNode; /** * Builder for {@link io.openvidu.java.client.RecordingProperties} @@ -47,6 +48,7 @@ public class RecordingProperties { private boolean hasAudio = true; private boolean hasVideo = true; private long shmSize = 536870912L; + private String mediaNode; /** * Builder for {@link io.openvidu.java.client.RecordingProperties} @@ -61,7 +63,7 @@ public class RecordingProperties { } } return new RecordingProperties(this.name, this.outputMode, this.recordingLayout, this.customLayout, - this.resolution, this.hasAudio, this.hasVideo, this.shmSize); + this.resolution, this.hasAudio, this.hasVideo, this.shmSize, this.mediaNode); } /** @@ -168,10 +170,26 @@ public class RecordingProperties { return this; } + /** + * PRO Call this method to force the recording to be hosted in + * the Media Node with identifier mediaNodeId. This property only + * applies to COMPOSED recordings and is ignored for INDIVIDUAL recordings, that + * are always hosted in the same Media Node hosting its Session + */ + public RecordingProperties.Builder mediaNode(String mediaNodeId) { + this.mediaNode = mediaNodeId; + return this; + } + } protected RecordingProperties(String name, Recording.OutputMode outputMode, RecordingLayout layout, - String customLayout, String resolution, boolean hasAudio, boolean hasVideo, long shmSize) { + String customLayout, String resolution, boolean hasAudio, boolean hasVideo, long shmSize, + String mediaNode) { this.name = name; this.outputMode = outputMode; this.recordingLayout = layout; @@ -180,6 +198,7 @@ public class RecordingProperties { this.hasAudio = hasAudio; this.hasVideo = hasVideo; this.shmSize = shmSize; + this.mediaNode = mediaNode; } /** @@ -284,4 +303,18 @@ public class RecordingProperties { return this.shmSize; } + /** + * PRO The Media Node where to host the recording. The default + * option if this property is not defined is the same Media Node hosting the + * Session to record. This property only applies to COMPOSED recordings and is + * ignored for INDIVIDUAL recordings + */ + public String mediaNode() { + return this.mediaNode; + } + }