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 30d3b0c8..c89c490b 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
@@ -50,7 +50,9 @@ public class RecordingProperties {
* Builder for {@link io.openvidu.java.client.RecordingProperties}
*/
public RecordingProperties build() {
- this.resolution = (this.resolution == null) ? (OutputMode.COMPOSED.equals(this.outputMode) ? "1920x1080" : null) : this.resolution;
+ this.resolution = (this.resolution == null)
+ ? (OutputMode.COMPOSED.equals(this.outputMode) ? "1920x1080" : null)
+ : this.resolution;
return new RecordingProperties(this.name, this.outputMode, this.recordingLayout, this.customLayout,
this.resolution, this.hasAudio, this.hasVideo);
}
@@ -121,7 +123,7 @@ public class RecordingProperties {
}
/**
- * Call this method to specify whether or not to record the audio track
+ * Call this method to specify whether to record audio or not. Cannot be set to false at the same time as {@link hasVideo(boolean)}
*/
public RecordingProperties.Builder hasAudio(boolean hasAudio) {
this.hasAudio = hasAudio;
@@ -129,7 +131,7 @@ public class RecordingProperties {
}
/**
- * Call this method to specify whether or not to record the video track
+ * Call this method to specify whether to record video or not. Cannot be set to false at the same time as {@link hasAudio(boolean)}
*/
public RecordingProperties.Builder hasVideo(boolean hasVideo) {
this.hasVideo = hasVideo;
@@ -159,15 +161,20 @@ public class RecordingProperties {
}
/**
- * Defines the mode of recording: COMPOSED for a single archive in a grid layout
- * or INDIVIDUAL for one archive for each stream
+ * Defines the mode of recording: {@link Recording.OutputMode#COMPOSED} for a
+ * single archive in a grid layout or {@link Recording.OutputMode#INDIVIDUAL}
+ * for one archive for each stream
*/
public Recording.OutputMode outputMode() {
return this.outputMode;
}
/**
- * Defines the layout to be used in the recording
+ * Defines the layout to be used in the recording.
+ * Will only have effect if
+ * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)}
+ * has been called with value
+ * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED}
*/
public RecordingLayout recordingLayout() {
return this.recordingLayout;
@@ -176,8 +183,8 @@ public class RecordingProperties {
/**
* If {@link io.openvidu.java.client.RecordingProperties#recordingLayout()} is
* set to {@link io.openvidu.java.client.RecordingLayout#CUSTOM}, this property
- * defines the relative path to the specific custom layout you want to use. See
- *
+ * See Custom recording layouts to learn more
*/
@@ -186,21 +193,28 @@ public class RecordingProperties {
}
/**
- * Defines the resolution of the recorded video
+ * Defines the resolution of the recorded video.
+ * Will only have effect if
+ * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)}
+ * has been called with value
+ * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED}. For
+ * {@link io.openvidu.java.client.Recording.OutputMode#INDIVIDUAL} all
+ * individual video files will have the native resolution of the published
+ * stream
*/
public String resolution() {
return this.resolution;
}
/**
- * Defines if the recording has an audio track or not
+ * Defines whether to record audio or not. Cannot be set to false at the same time as {@link hasVideo()}
*/
public boolean hasAudio() {
return this.hasAudio;
}
/**
- * Defines if the recording has a video track or not
+ * Defines whether to record video or not. Cannot be set to false at the same time as {@link hasAudio()}
*/
public boolean hasVideo() {
return this.hasVideo;
diff --git a/openvidu-java-client/src/main/java/io/openvidu/java/client/SessionProperties.java b/openvidu-java-client/src/main/java/io/openvidu/java/client/SessionProperties.java
index 06dde347..83f2358a 100644
--- a/openvidu-java-client/src/main/java/io/openvidu/java/client/SessionProperties.java
+++ b/openvidu-java-client/src/main/java/io/openvidu/java/client/SessionProperties.java
@@ -17,6 +17,8 @@
package io.openvidu.java.client;
+import io.openvidu.java.client.Recording.OutputMode;
+
/**
* See {@link io.openvidu.java.client.OpenVidu#createSession(SessionProperties)}
*/
@@ -24,6 +26,7 @@ public class SessionProperties {
private MediaMode mediaMode;
private RecordingMode recordingMode;
+ private OutputMode defaultOutputMode;
private RecordingLayout defaultRecordingLayout;
private String defaultCustomLayout;
private String customSessionId;
@@ -35,6 +38,7 @@ public class SessionProperties {
private MediaMode mediaMode = MediaMode.ROUTED;
private RecordingMode recordingMode = RecordingMode.MANUAL;
+ private OutputMode defaultOutputMode = OutputMode.COMPOSED;
private RecordingLayout defaultRecordingLayout = RecordingLayout.BEST_FIT;
private String defaultCustomLayout = "";
private String customSessionId = "";
@@ -44,8 +48,8 @@ public class SessionProperties {
* configured
*/
public SessionProperties build() {
- return new SessionProperties(this.mediaMode, this.recordingMode, this.defaultRecordingLayout,
- this.defaultCustomLayout, this.customSessionId);
+ return new SessionProperties(this.mediaMode, this.recordingMode, this.defaultOutputMode,
+ this.defaultRecordingLayout, this.defaultCustomLayout, this.customSessionId);
}
/**
@@ -63,25 +67,39 @@ public class SessionProperties {
/**
* Call this method to set whether the Session will be automatically recorded
- * (RecordingMode.ALWAYS
) or not
- * (RecordingMode.MANUAL
)
- *
- * Default value is RecordingMode.MANUAL
+ * ({@link RecordingMode#ALWAYS}) or not ({@link RecordingMode#MANUAL})
+ * Default value is {@link RecordingMode#MANUAL}
*/
public SessionProperties.Builder recordingMode(RecordingMode recordingMode) {
this.recordingMode = recordingMode;
return this;
}
+ /**
+ * Call this method to set the the default value used to initialize property
+ * {@link io.openvidu.java.client.RecordingProperties#outputMode()} of every
+ * recording of this session. You can easily override this value later when
+ * starting a {@link io.openvidu.java.client.Recording} by calling
+ * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)}
+ * with any other value.
+ * Default value is {@link Recording.OutputMode#COMPOSED}
+ */
+ public SessionProperties.Builder defaultOutputMode(OutputMode outputMode) {
+ this.defaultOutputMode = outputMode;
+ return this;
+ }
+
/**
* Call this method to set the the default value used to initialize property
* {@link io.openvidu.java.client.RecordingProperties#recordingLayout()} of
* every recording of this session. You can easily override this value later
- * when initializing a {@link io.openvidu.java.client.Recording} by calling
+ * when starting a {@link io.openvidu.java.client.Recording} by calling
* {@link io.openvidu.java.client.RecordingProperties.Builder#recordingLayout(RecordingLayout)}
- * with any other value
- *
- * Default value is RecordingLayout.BEST_FIT
+ * with any other value.
+ * Default value is {@link RecordingLayout#BEST_FIT}
+ *
+ * Recording layouts are only applicable to recordings with OutputMode
+ * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED}
*/
public SessionProperties.Builder defaultRecordingLayout(RecordingLayout layout) {
this.defaultRecordingLayout = layout;
@@ -92,9 +110,13 @@ public class SessionProperties {
* Call this method to set the default value used to initialize property
* {@link io.openvidu.java.client.RecordingProperties#customLayout()} of every
* recording of this session. You can easily override this value later when
- * initializing a {@link io.openvidu.java.client.Recording} by calling
+ * starting a {@link io.openvidu.java.client.Recording} by calling
* {@link io.openvidu.java.client.RecordingProperties.Builder#customLayout(String)}
- * with any other value
+ * with any other value.
+ *
+ * Custom layouts are only applicable to recordings with OutputMode
+ * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} and
+ * RecordingLayout {@link io.openvidu.java.client.RecordingLayout#CUSTOM}
*/
public SessionProperties.Builder defaultCustomLayout(String path) {
this.defaultCustomLayout = path;
@@ -118,29 +140,22 @@ public class SessionProperties {
protected SessionProperties() {
this.mediaMode = MediaMode.ROUTED;
this.recordingMode = RecordingMode.MANUAL;
+ this.defaultOutputMode = OutputMode.COMPOSED;
this.defaultRecordingLayout = RecordingLayout.BEST_FIT;
this.defaultCustomLayout = "";
this.customSessionId = "";
}
- private SessionProperties(MediaMode mediaMode, RecordingMode recordingMode, RecordingLayout layout,
- String defaultCustomLayout, String customSessionId) {
+ private SessionProperties(MediaMode mediaMode, RecordingMode recordingMode, OutputMode outputMode,
+ RecordingLayout layout, String defaultCustomLayout, String customSessionId) {
this.mediaMode = mediaMode;
this.recordingMode = recordingMode;
+ this.defaultOutputMode = outputMode;
this.defaultRecordingLayout = layout;
this.defaultCustomLayout = defaultCustomLayout;
this.customSessionId = customSessionId;
}
- /**
- * Defines whether the Session will be automatically recorded
- * (RecordingMode.ALWAYS
) or not
- * (RecordingMode.MANUAL
)
- */
- public RecordingMode recordingMode() {
- return this.recordingMode;
- }
-
/**
* Defines how the media streams will be sent and received by your clients:
* routed through OpenVidu Media Server (MediaMode.ROUTED
) or
@@ -151,13 +166,35 @@ public class SessionProperties {
return this.mediaMode;
}
+ /**
+ * Defines whether the Session will be automatically recorded
+ * ({@link RecordingMode#ALWAYS}) or not ({@link RecordingMode#MANUAL})
+ */
+ public RecordingMode recordingMode() {
+ return this.recordingMode;
+ }
+
+ /**
+ * Defines the default value used to initialize property
+ * {@link io.openvidu.java.client.RecordingProperties#outputMode()} of every
+ * recording of this session. You can easily override this value later when
+ * starting a {@link io.openvidu.java.client.Recording} by calling
+ * {@link io.openvidu.java.client.RecordingProperties.Builder#outputMode(Recording.OutputMode)}
+ * with any other value
+ */
+ public OutputMode defaultOutputMode() {
+ return this.defaultOutputMode;
+ }
+
/**
* Defines the default value used to initialize property
* {@link io.openvidu.java.client.RecordingProperties#recordingLayout()} of
* every recording of this session. You can easily override this value later
- * when initializing a {@link io.openvidu.java.client.Recording} by calling
+ * when starting a {@link io.openvidu.java.client.Recording} by calling
* {@link io.openvidu.java.client.RecordingProperties.Builder#recordingLayout(RecordingLayout)}
- * with any other value
+ * with any other value.
+ * Recording layouts are only applicable to recordings with OutputMode
+ * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED}
*/
public RecordingLayout defaultRecordingLayout() {
return this.defaultRecordingLayout;
@@ -167,9 +204,12 @@ public class SessionProperties {
* Defines the default value used to initialize property
* {@link io.openvidu.java.client.RecordingProperties#customLayout()} of every
* recording of this session. You can easily override this value later when
- * initializing a {@link io.openvidu.java.client.Recording} by calling
+ * starting a {@link io.openvidu.java.client.Recording} by calling
* {@link io.openvidu.java.client.RecordingProperties.Builder#customLayout(String)}
- * with any other value
+ * with any other value.
+ * Custom layouts are only applicable to recordings with OutputMode
+ * {@link io.openvidu.java.client.Recording.OutputMode#COMPOSED} and
+ * RecordingLayout {@link io.openvidu.java.client.RecordingLayout#CUSTOM}
*/
public String defaultCustomLayout() {
return this.defaultCustomLayout;
diff --git a/openvidu-node-client/src/RecordingProperties.ts b/openvidu-node-client/src/RecordingProperties.ts
index ee1b1181..0c64d1ef 100644
--- a/openvidu-node-client/src/RecordingProperties.ts
+++ b/openvidu-node-client/src/RecordingProperties.ts
@@ -57,12 +57,12 @@ export interface RecordingProperties {
resolution?: string;
/**
- * Whether or not to record the audio track (currently fixed to true)
+ * Whether or not to record audio. Cannot be set to false at the same time as [[RecordingProperties.hasVideo]]
*/
hasAudio?: boolean;
/**
- * Whether or not to record the video track (currently fixed to true)
+ * Whether or not to record video. Cannot be set to false at the same time as [[RecordingProperties.hasAudio]]
*/
hasVideo?: boolean;
}
\ No newline at end of file
diff --git a/openvidu-node-client/src/SessionProperties.ts b/openvidu-node-client/src/SessionProperties.ts
index 903b323b..5a744cd1 100644
--- a/openvidu-node-client/src/SessionProperties.ts
+++ b/openvidu-node-client/src/SessionProperties.ts
@@ -16,6 +16,7 @@
*/
import { MediaMode } from './MediaMode';
+import { Recording } from './Recording';
import { RecordingLayout } from './RecordingLayout';
import { RecordingMode } from './RecordingMode';
@@ -35,6 +36,13 @@ export interface SessionProperties {
*/
recordingMode?: RecordingMode;
+ /**
+ * Default value used to initialize property [[RecordingProperties.outputMode]] of every recording of this session.
+ *
+ * You can easily override this value later by setting [[RecordingProperties.outputMode]] to any other value
+ */
+ defaultOutputMode?: Recording.OutputMode;
+
/**
* Default value used to initialize property [[RecordingProperties.recordingLayout]] of every recording of this session.
*