java.lang.Object

com.opentok.ArchiveProperties.Builder

Enclosing class: : ArchiveProperties


public static class ArchiveProperties.Builder extends Object

Used to create an ArchiveProperties object.

See Also: : - ArchiveProperties

Constructor Summary

Constructors

Constructor

Description

Builder()

Method Summary

All MethodsInstance MethodsConcrete 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 not false).

ArchiveProperties.Builder

hasVideo(boolean hasVideo)

Call this method to include an video track (true, the default) or not false).

ArchiveProperties.Builder

layout(ArchiveLayout layout)

Sets the layout for a composed archive.

ArchiveProperties.Builder

maxBitrate(int maxBitrate)

Sets the maximum bitrate (bps) for the archive.

ArchiveProperties.Builder

multiArchiveTag(String multiArchiveTag)

Set this to support recording multiple archives for the same session simultaneously.

ArchiveProperties.Builder

name(String name)

Sets a name for the archive.

ArchiveProperties.Builder

outputMode(Archive.OutputMode outputMode)

Sets the output mode for this archive.

ArchiveProperties.Builder

resolution(String resolution)

Sets the resolution of the archive.

ArchiveProperties.Builder

streamMode(Archive.StreamMode streamMode)

Sets the stream mode for this archive.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

Builder

public Builder()

Method Details

name

public ArchiveProperties.Builder name(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(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 not false).

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 not false).

Parameters: : hasVideo - Whether the archive will include a video track.

Returns: : The ArchiveProperties.Builder object with the hasVideo setting.

maxBitrate

public ArchiveProperties.Builder maxBitrate(int 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

public ArchiveProperties.Builder outputMode(Archive.OutputMode outputMode)

Sets the output mode for this archive.

Parameters: : outputMode - Set to a value defined in the Archive.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 the OpenTok.addArchiveStream(String, String, boolean, boolean) and OpenTok.removeArchiveStream(String, String) methods. With StreamMode.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 the Archive.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 type ArchiveLayout .

Returns: : The ArchiveProperties.Builder object with the layout setting.

multiArchiveTag

public ArchiveProperties.Builder multiArchiveTag(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.