Package com.opentok
Class ArchiveProperties.Builder
- java.lang.Object
-
- com.opentok.ArchiveProperties.Builder
-
- Enclosing class:
- ArchiveProperties
public static class ArchiveProperties.Builder extends java.lang.Object
Used to create an ArchiveProperties object.- See Also:
ArchiveProperties
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArchiveProperties
build()
Builds the ArchiveProperties object.ArchiveProperties.Builder
hasAudio(boolean hasAudio)
Call this method to include an audio track (true
, the default) or notfalse
).ArchiveProperties.Builder
hasVideo(boolean hasVideo)
Call this method to include an video track (true
, the default) or notfalse
).ArchiveProperties.Builder
layout(ArchiveLayout layout)
Sets the layout for a composed archive.ArchiveProperties.Builder
multiArchiveTag(java.lang.String multiArchiveTag)
Set this to support recording multiple archives for the same session simultaneously.ArchiveProperties.Builder
name(java.lang.String name)
Sets a name for the archive.ArchiveProperties.Builder
outputMode(Archive.OutputMode outputMode)
Sets the output mode for this archive.ArchiveProperties.Builder
resolution(java.lang.String resolution)
Sets the resolution of the archive.ArchiveProperties.Builder
streamMode(Archive.StreamMode streamMode)
Sets the stream mode for this archive.
-
-
-
Method Detail
-
name
public ArchiveProperties.Builder name(java.lang.String 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
public ArchiveProperties.Builder resolution(java.lang.String 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
public ArchiveProperties.Builder hasAudio(boolean 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
public ArchiveProperties.Builder hasVideo(boolean 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.
-
outputMode
public ArchiveProperties.Builder outputMode(Archive.OutputMode 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
public ArchiveProperties.Builder streamMode(Archive.StreamMode 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
public ArchiveProperties.Builder layout(ArchiveLayout layout)
Sets the layout for a composed archive.- Parameters:
layout
- An object of typeArchiveLayout
.- Returns:
- The ArchiveProperties.Builder object with the layout setting.
-
multiArchiveTag
public ArchiveProperties.Builder multiArchiveTag(java.lang.String 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
public ArchiveProperties build()
Builds the ArchiveProperties object.- Returns:
- The ArchiveProperties object.
-
-