Package io.openvidu.java.client
Class RecordingProperties.Builder
- java.lang.Object
-
- io.openvidu.java.client.RecordingProperties.Builder
-
- Enclosing class:
- RecordingProperties
public static class RecordingProperties.Builder extends Object
Builder forRecordingProperties
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(RecordingProperties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordingProperties
build()
Builder forRecordingProperties
RecordingProperties.Builder
customLayout(String path)
If settingrecordingLayout(RecordingLayout)
toRecordingLayout.CUSTOM
you can call this method to set the relative path to the specific custom layout you want to use.
See Custom recording layouts to learn moreRecordingProperties.Builder
frameRate(int frameRate)
Call this method to specify the recording frame rate.RecordingProperties.Builder
hasAudio(boolean hasAudio)
Call this method to specify whether to record audio or not.RecordingProperties.Builder
hasVideo(boolean hasVideo)
Call this method to specify whether to record video or not.RecordingProperties.Builder
ignoreFailedStreams(boolean ignoreFailedStreams)
Call this method to specify whether to ignore failed streams or not when starting the recording.RecordingProperties.Builder
mediaNode(String mediaNodeId)
PRO Call this method to force the recording to be hosted in the Media Node with identifiermediaNodeId
.RecordingProperties.Builder
name(String name)
Call this method to set the name of the video fileRecordingProperties.Builder
outputMode(Recording.OutputMode outputMode)
Call this method to set the mode of recording:Recording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
for a single archive in a grid layout orRecording.OutputMode.INDIVIDUAL
for one archive for each stream.RecordingProperties.Builder
recordingLayout(RecordingLayout layout)
Call this method to set the layout to be used in the recording.RecordingProperties.Builder
resolution(String resolution)
Call this method to specify the recording resolution.RecordingProperties.Builder
shmSize(long shmSize)
Call this method to specify the amount of shared memory reserved for the recording process in bytes.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(RecordingProperties props)
-
-
Method Detail
-
build
public RecordingProperties build()
Builder forRecordingProperties
-
name
public RecordingProperties.Builder name(String name)
Call this method to set the name of the video file
-
hasAudio
public RecordingProperties.Builder hasAudio(boolean hasAudio)
Call this method to specify whether to record audio or not. Cannot be set to false at the same time ashasVideo(boolean)
-
hasVideo
public RecordingProperties.Builder hasVideo(boolean hasVideo)
Call this method to specify whether to record video or not. Cannot be set to false at the same time ashasAudio(boolean)
-
outputMode
public RecordingProperties.Builder outputMode(Recording.OutputMode outputMode)
Call this method to set the mode of recording:Recording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
for a single archive in a grid layout orRecording.OutputMode.INDIVIDUAL
for one archive for each stream.
-
recordingLayout
public RecordingProperties.Builder recordingLayout(RecordingLayout layout)
Call this method to set the layout to be used in the recording. Will only have effect forRecording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
recordings withRecordingProperties.hasVideo()
to true.
-
resolution
public RecordingProperties.Builder resolution(String resolution)
Call this method to specify the recording resolution. Must be a string with format "WIDTHxHEIGHT", being both WIDTH and HEIGHT the number of pixels between 100 and 1999.
Will only have effect forRecording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
recordings withRecordingProperties.hasVideo()
to true. Property ignored for INDIVIDUAL recordings and audio-only recordings. ForRecording.OutputMode.INDIVIDUAL
all individual video files will have the native resolution of the published stream.
-
frameRate
public RecordingProperties.Builder frameRate(int frameRate)
Call this method to specify the recording frame rate. Will only have effect forRecording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
recordings withRecordingProperties.hasVideo()
to true. Property ignored for INDIVIDUAL recordings and audio-only recordings. ForRecording.OutputMode.INDIVIDUAL
all individual video files will have the native frame rate of the published stream.
-
shmSize
public RecordingProperties.Builder shmSize(long shmSize)
Call this method to specify the amount of shared memory reserved for the recording process in bytes. Minimum 134217728 (128MB).
Will only have effect forRecording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
recordings withRecordingProperties.hasVideo()
to true. Property ignored for INDIVIDUAL recordings and audio-only recordings
-
customLayout
public RecordingProperties.Builder customLayout(String path)
If settingrecordingLayout(RecordingLayout)
toRecordingLayout.CUSTOM
you can call this method to set the relative path to the specific custom layout you want to use.
See Custom recording layouts to learn more
-
ignoreFailedStreams
public RecordingProperties.Builder ignoreFailedStreams(boolean ignoreFailedStreams)
Call this method to specify whether to ignore failed streams or not when starting the recording. This property only applies toRecording.OutputMode.INDIVIDUAL
recordings. For this type of recordings, when callingOpenVidu.startRecording(String, RecordingProperties)
by default all the streams available at the moment the recording process starts must be healthy and properly sending media. If some stream that should be sending media is broken, then the recording process fails after a 10s timeout. In this way your application is notified that some stream is not being recorded, so it can retry the process again. But you can disable this rollback behavior and simply ignore any failed stream, which will be susceptible to be recorded in the future if media starts flowing as expected at any point. The downside of this behavior is that you will have no guarantee that all streams present at the beginning of a recording are actually being recorded.
-
mediaNode
public RecordingProperties.Builder mediaNode(String mediaNodeId)
PRO Call this method to force the recording to be hosted in the Media Node with identifiermediaNodeId
. This property only applies toRecording.OutputMode.COMPOSED
orRecording.OutputMode.COMPOSED_QUICK_START
recordings withRecordingProperties.hasVideo()
to true and is ignored forRecording.OutputMode.INDIVIDUAL
recordings and audio-only recordings, that are always hosted in the same Media Node hosting its Session
-
-