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 RecordingPropertiesbuild()Builder forRecordingPropertiesRecordingProperties.BuildercustomLayout(String path)If settingrecordingLayout(RecordingLayout)toRecordingLayout.CUSTOMyou 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.BuilderframeRate(int frameRate)Call this method to specify the recording frame rate.RecordingProperties.BuilderhasAudio(boolean hasAudio)Call this method to specify whether to record audio or not.RecordingProperties.BuilderhasVideo(boolean hasVideo)Call this method to specify whether to record video or not.RecordingProperties.BuilderignoreFailedStreams(boolean ignoreFailedStreams)Call this method to specify whether to ignore failed streams or not when starting the recording.RecordingProperties.BuildermediaNode(String mediaNodeId)PRO Call this method to force the recording to be hosted in the Media Node with identifiermediaNodeId.RecordingProperties.Buildername(String name)Call this method to set the name of the video fileRecordingProperties.BuilderoutputMode(Recording.OutputMode outputMode)Call this method to set the mode of recording:Recording.OutputMode.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTfor a single archive in a grid layout orRecording.OutputMode.INDIVIDUALfor one archive for each stream.RecordingProperties.BuilderrecordingLayout(RecordingLayout layout)Call this method to set the layout to be used in the recording.RecordingProperties.Builderresolution(String resolution)Call this method to specify the recording resolution.RecordingProperties.BuildershmSize(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.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTfor a single archive in a grid layout orRecording.OutputMode.INDIVIDUALfor 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.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTrecordings 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.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTrecordings withRecordingProperties.hasVideo()to true. Property ignored for INDIVIDUAL recordings and audio-only recordings. ForRecording.OutputMode.INDIVIDUALall 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.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTrecordings withRecordingProperties.hasVideo()to true. Property ignored for INDIVIDUAL recordings and audio-only recordings. ForRecording.OutputMode.INDIVIDUALall 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.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTrecordings withRecordingProperties.hasVideo()to true. Property ignored for INDIVIDUAL recordings and audio-only recordings
-
customLayout
public RecordingProperties.Builder customLayout(String path)
If settingrecordingLayout(RecordingLayout)toRecordingLayout.CUSTOMyou 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.INDIVIDUALrecordings. 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.COMPOSEDorRecording.OutputMode.COMPOSED_QUICK_STARTrecordings withRecordingProperties.hasVideo()to true and is ignored forRecording.OutputMode.INDIVIDUALrecordings and audio-only recordings, that are always hosted in the same Media Node hosting its Session
-
-