Package com.vonage.client.video
Class Archive.Builder
java.lang.Object
com.vonage.client.video.StreamComposition.Builder
com.vonage.client.video.Archive.Builder
- Enclosing class:
Archive
Used to construct an Archive object.
- See Also:
-
Field Summary
Fields inherited from class com.vonage.client.video.StreamComposition.Builder
hasAudio, hasVideo, layout, maxBitrate, resolution, sessionId, streamMode -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the Archive object with this builder's settings.hasAudio(boolean hasAudio) Call this method to include an audio track (true, the default) or notfalse).hasVideo(boolean hasVideo) Call this method to include a video track (true, the default) or notfalse).layout(StreamCompositionLayout layout) Sets the layout for a composed archive.maxBitrate(int maxBitrate) (OPTIONAL) The maximum bitrate for the archive, in bits per second.multiArchiveTag(String multiArchiveTag) Set this to support recording multiple archives for the same session simultaneously.Sets a name for the archive.outputMode(OutputMode outputMode) Sets the output mode for this archive.resolution(Resolution resolution) Sets the resolution of the archive.streamMode(StreamMode streamMode) Sets the stream mode for this archive.
-
Method Details
-
name
Sets a name for the archive.- Parameters:
name- The name of the archive. You can use this name to identify the archive. It is a property of the Archive object, and it is a property of archive-related events in the SDK.- Returns:
- This Builder with the name setting.
-
resolution
Sets the resolution of the archive.- Parameters:
resolution- The resolution of the archive, either "640x480" (SD, the default) or "1280x720" (HD). This property only applies to composed archives. If you set this and set the outputMode property to "individual", the call in the API method results in an error.- Returns:
- This Builder with the resolution setting.
-
hasAudio
Call this method to include an audio track (true, the default) or notfalse).- Parameters:
hasAudio- Whether the archive will include an audio track.- Returns:
- This Builder with the hasAudio setting.
-
hasVideo
Call this method to include a video track (true, the default) or notfalse).- Parameters:
hasVideo- Whether the archive will include a video track.- Returns:
- This Builder with the hasVideo setting.
-
outputMode
Sets the output mode for this archive.- Parameters:
outputMode- Set to a value defined in theOutputModeenum.- Returns:
- This Builder with the output mode setting.
-
streamMode
Sets the stream mode for this archive.When streams are selected automatically (
StreamMode.AUTO, the default), all streams in the session can be included in the archive. When streams are selected manually (StreamMode.MANUAL), you specify streams to be included based on calls to theVideoClient.addArchiveStream(String, String, Boolean, Boolean)andVideoClient.removeArchiveStream(String, String)methods. WithStreamMode.MANUAL, you can specify whether a stream's audio, video, or both are included in the archive. In both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.- Parameters:
streamMode- Set to a value defined in theStreamModeenum.- Returns:
- This Builder with the stream mode setting.
-
layout
Sets the layout for a composed archive. If this option is specified, outputMode(OutputMode) must be OutputMode.COMPOSED.- Parameters:
layout- The layout type to use.- Returns:
- This Builder with the layout setting.
-
multiArchiveTag
Set this to support recording multiple archives for the same session simultaneously. Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive that is automatically archived. If you do not specify a unique multiArchiveTag, you can only record one archive at a time for a given session. See Simultaneous Archives documentation.- Parameters:
multiArchiveTag- A unique archive tag.- Returns:
- This Builder with the MultiArchiveTag setting.
-
maxBitrate
(OPTIONAL) The maximum bitrate for the archive, in bits per second. This must be between 100000 and 6000000.- Parameters:
maxBitrate- The maximum bitrate as an int.- Returns:
- This builder.
- Since:
- 8.14.0
-
build
Builds the Archive object with this builder's settings.- Returns:
- A new
Archiveinstance.
-