java.lang.Object

com.opentok.Archive


public class Archive extends Object

Represents an archive of an OpenTok session.

Nested Class Summary

Nested Classes

Modifier and Type

Class

Description

static enum

Archive.OutputMode

Defines values used in the ArchiveProperties.Builder.outputMode(com.opentok.Archive.OutputMode) method and returned by the getOutputMode() method.

static enum

Archive.Status

Defines values returned by the getStatus() method.

static enum

Archive.StreamMode

Defines values used in the ArchiveProperties.Builder.streamMode(com.opentok.Archive.StreamMode) method and returned by the getStreamMode() method.

Method Summary

All MethodsStatic MethodsInstance MethodsConcrete Methods

Modifier and Type

Method

Description

long

getCreatedAt()

The time at which the archive was created, in milliseconds since the Unix epoch.

int

getDuration()

The duration of the archive, in seconds.

String

getId()

The archive ID.

int

getMaxBitrate()

The maximum bitrate of the archive, in bits per second.

String

getMultiArchiveTag()

Returns the multiArchiveTag if set for the Archive.

String

getName()

The name of the archive.

Archive.OutputMode

getOutputMode()

The output mode to be generated for this archive: composed or individual.

int

getPartnerId()

The OpenTok API key associated with the archive.

String

getPassword()

The encrypted password if an archive storage was configured to use an encryption key

String

getReason()

For archives with the status Status.STOPPED or Status.FAILED, this string describes the reason the archive stopped (such as "maximum duration exceeded") or failed.

String

getResolution()

The resolution of the archive.

String

getSessionId()

The session ID of the OpenTok session associated with this archive.

long

getSize()

The size of the MP4 file.

Archive.Status

getStatus()

The status of the archive, as defined by the Archive.Status enum.

Archive.StreamMode

getStreamMode()

The stream mode to used for selecting streams to be included in this archive: StreamMode.AUTO or StreamMode.MANUAL.

String

getUrl()

The download URL of the available MP4 file.

boolean

hasAudio()

Whether the archive has an audio track (true) or not (false).

boolean

hasVideo()

Whether the archive has a video track (true) or not (false).

static Archive

makeArchive()

String

toString()

Methods inherited from class java.lang.Object

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

Method Details

makeArchive

public static Archive makeArchive()

getCreatedAt

public long getCreatedAt()

The time at which the archive was created, in milliseconds since the Unix epoch.

getDuration

public int getDuration()

The duration of the archive, in seconds.

getId

public String getId()

The archive ID.

getName

public String getName()

The name of the archive.

getResolution

public String getResolution()

The resolution of the archive.

getPartnerId

public int getPartnerId()

The OpenTok API key associated with the archive.

getReason

public String getReason()

For archives with the status Status.STOPPED or Status.FAILED, this string describes the reason the archive stopped (such as "maximum duration exceeded") or failed.

getSessionId

public String getSessionId()

The session ID of the OpenTok session associated with this archive.

getSize

public long getSize()

The size of the MP4 file. For archives that have not been generated, this value is set to 0.

getMaxBitrate

public int getMaxBitrate()

The maximum bitrate of the archive, in bits per second.

Since: : 4.15.0

getStatus

public Archive.Status getStatus()

The status of the archive, as defined by the Archive.Status enum.

getUrl

public String getUrl()

The download URL of the available MP4 file. This is only set for an archive with the status set to Status.AVAILABLE; for other archives, (including archives with the status of Status.UPLOADED) this method returns null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes. To generate a new URL, call the OpenTok.listArchives() or OpenTok.getArchive(String) method.

hasVideo

public boolean hasVideo()

Whether the archive has a video track (true) or not (false).

hasAudio

public boolean hasAudio()

Whether the archive has an audio track (true) or not (false).

getOutputMode

public Archive.OutputMode getOutputMode()

The output mode to be generated for this archive: composed or individual.

getStreamMode

public Archive.StreamMode getStreamMode()

The stream mode to used for selecting streams to be included in this archive: StreamMode.AUTO or StreamMode.MANUAL.

getPassword

public String getPassword()

The encrypted password if an archive storage was configured to use an encryption key

getMultiArchiveTag

public String getMultiArchiveTag()

Returns the multiArchiveTag if set for the Archive.

toString

public String toString()

Overrides: : toString in class Object