Package com.opentok
Class ArchiveProperties.Builder
java.lang.Object
com.opentok.ArchiveProperties.Builder
- Enclosing class:
- ArchiveProperties
Used to create an ArchiveProperties object.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the ArchiveProperties object.hasAudio
(boolean hasAudio) Call this method to include an audio track (true
, the default) or notfalse
).hasVideo
(boolean hasVideo) Call this method to include an video track (true
, the default) or notfalse
).layout
(ArchiveLayout layout) Sets the layout for a composed archive.maxBitrate
(int maxBitrate) Sets the maximum bitrate (bps) for the archive.multiArchiveTag
(String multiArchiveTag) Set this to support recording multiple archives for the same session simultaneously.Sets a name for the archive.outputMode
(Archive.OutputMode outputMode) Sets the output mode for this archive.resolution
(String resolution) Sets the resolution of the archive.streamMode
(Archive.StreamMode streamMode) Sets the stream mode for this archive.
-
Constructor Details
-
Builder
public Builder()
-
-
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 OpenTok JavaScript SDK.- Returns:
- The ArchiveProperties.Builder object 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:
- The ArchiveProperties.Builder object 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:
- The ArchiveProperties.Builder object with the hasAudio setting.
-
hasVideo
Call this method to include an video track (true
, the default) or notfalse
).- Parameters:
hasVideo
- Whether the archive will include a video track.- Returns:
- The ArchiveProperties.Builder object with the hasVideo setting.
-
maxBitrate
Sets the maximum bitrate (bps) for the archive. Minimum is 100000, maximum is 6000000.- Parameters:
maxBitrate
- The maximum bitrate (in bits per second) for the archiving.- Returns:
- The ArchiveProperties.Builder object with the maxBitrate setting.
- Since:
- 4.15.0
-
outputMode
Sets the output mode for this archive.- Parameters:
outputMode
- Set to a value defined in theArchive.OutputMode
enum.- Returns:
- The ArchiveProperties.Builder object 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 theOpenTok.addArchiveStream(String, String, boolean, boolean)
andOpenTok.removeArchiveStream(String, String)
methods. WithStreamMode.MANUAL
, you can specify whether a stream's audio, video, or both are included in the archive. Un both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.- Parameters:
streamMode
- Set to a value defined in theArchive.StreamMode
enum.- Returns:
- The ArchiveProperties.Builder object with the stream mode setting.
-
layout
Sets the layout for a composed archive.- Parameters:
layout
- An object of typeArchiveLayout
.- Returns:
- The ArchiveProperties.Builder object 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:
- The ArchiveProperties.Builder object with the MultiArchiveTag setting.
-
build
Builds the ArchiveProperties object.- Returns:
- The ArchiveProperties object.
-