close search

Add Messaging, Voice, and Authentication to your apps with Nexmo APIs

Visit Nexmo


Public Member Functions

void Stop ()
void Delete ()


long CreatedAt [get, set]
long Duration [get, set]
Guid Id [get, set]
string Name [get, set]
int PartnerId [get, set]
String SessionId [get, set]
String Reason [get, set]
bool HasVideo [get, set]
bool HasAudio [get, set]
string Resolution [get, set]
OutputMode OutputMode [get, set]
long Size [get, set]
ArchiveStatus Status [get, set]
String Url [get, set]
String Password [get, set]

Detailed Description

Represents an archive of an OpenTok session.

Member Function Documentation

◆ Delete()

void OpenTokSDK.Archive.Delete ( )

Deletes the OpenTok archive.

You can only delete an archive which has a status of "available" or "uploaded". Deleting an archive removes its record from the list of archives. For an "available" archive, it also removes the archive file, making it unavailable for download.

◆ Stop()

void OpenTokSDK.Archive.Stop ( )

Stops the OpenTok archive if it is being recorded.

Archives automatically stop recording after 120 minutes or when all clients have disconnected from the session being archived.

Property Documentation

◆ CreatedAt

long OpenTokSDK.Archive.CreatedAt

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

◆ Duration

long OpenTokSDK.Archive.Duration

The duration of the archive, in milliseconds.

◆ HasAudio

bool OpenTokSDK.Archive.HasAudio

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

◆ HasVideo

bool OpenTokSDK.Archive.HasVideo

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

◆ Id

Guid OpenTokSDK.Archive.Id

The archive ID.

◆ Name

string OpenTokSDK.Archive.Name

The name of the archive.

◆ OutputMode

OutputMode OpenTokSDK.Archive.OutputMode

Whether all streams in the archive are recorded to a single file (OutputMode.COMPOSED) or to individual files (OutputMode.INDIVIDUAL). To record streams to individual files, pass OutputMode.INDIVIDUAL as the outputMode parameter when calling the OpenTok.StartArchive() method.

◆ PartnerId

int OpenTokSDK.Archive.PartnerId

The OpenTok API key associated with the archive.

◆ Password

String OpenTokSDK.Archive.Password

The encryption password of the archive.

◆ Reason

String OpenTokSDK.Archive.Reason

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

◆ Resolution

string OpenTokSDK.Archive.Resolution

The resolution of the archive.

◆ SessionId

String OpenTokSDK.Archive.SessionId

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

◆ Size

long OpenTokSDK.Archive.Size

The size of the MP4 file. For archives that have not been generated, this value is set to 0. We use long instead of int to support archives larger than 2GB.

◆ Status

ArchiveStatus OpenTokSDK.Archive.Status

The status of the archive, as defined by the ArchiveStatus enum.

◆ Url

String OpenTokSDK.Archive.Url

The download URL of the available MP4 file. This is only set for an archive with the status set to ArchiveStatus.AVAILABLE; for other archives, (including archives with the status of ArchiveStatus.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 ListArchives() or GetArchive() method of the OpenTok object.