Table of Contents

Struct Archive

Namespace
Vonage.Video.Archives
Assembly
Vonage.dll

Represents an archive.

public struct Archive
Inherited Members

Constructors

Archive(long, int, bool, bool, string, string, string, string, RenderResolution, string, long, string, string, string, Stream[], string, bool, Maybe<Transcription>)

Creates an archive.

[JsonConstructor]
public Archive(long createdAt, int duration, bool hasAudio, bool hasVideo, string id, string name, string applicationId, string reason, RenderResolution resolution, string sessionId, long size, string status, string streamMode, string url, Archive.Stream[] streams, string multiArchiveTag, bool hasTranscription, Maybe<Transcription> transcription)

Parameters

createdAt long

The timestamp for when the archive started recording, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

duration int

The duration of the archive in seconds. For archives that have are being recorded (with the status property set to "started"), this value is set to 0.

hasAudio bool

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo bool

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

id string

The unique archive ID.

name string

The name of the archive (for your own identification)

applicationId string

Your Vonage application ID

reason string

For archives with the status "stopped", this can be set to "maximum duration exceeded", "maximum idle time exceeded", "session ended", "user initiated". For archives with the status "failed", this can be set to "failure".

resolution RenderResolution

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

sessionId string

The session ID of the Vonage Video session you are working with

size long

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

status string

The status of the archive.

streamMode string

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

url string

The download URL of the available archive file. This is only set for an archive with the status set to "available"; for other archives, (including archives with the status "uploaded") this property is set to null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes.

streams Stream[]

The collection of streams.

multiArchiveTag string

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 in a session 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.

hasTranscription bool

Whether the archive will have a transcription of the audio of the session (true) or not (false, the default).

transcription Maybe<Transcription>

The transcription properties.

Properties

ApplicationId

Your Vonage application ID.

public readonly string ApplicationId { get; }

Property Value

string

CreatedAt

The timestamp for when the archive started recording, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

public readonly long CreatedAt { get; }

Property Value

long

Duration

The duration of the archive in seconds. For archives that have are being recorded (with the status property set to "started"), this value is set to 0.

public readonly int Duration { get; }

Property Value

int

HasAudio

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

public readonly bool HasAudio { get; }

Property Value

bool

HasTranscription

Whether the archive will have a transcription of the audio of the session (true) or not (false, the default).

public readonly bool HasTranscription { get; }

Property Value

bool

HasVideo

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

public readonly bool HasVideo { get; }

Property Value

bool

Id

The unique archive ID.

public readonly string Id { get; }

Property Value

string

MaxBitrate

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

public int MaxBitrate { readonly get; set; }

Property Value

int

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 in a session 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.

public readonly string MultiArchiveTag { get; }

Property Value

string

Name

The name of the archive (for your own identification).

public readonly string Name { get; }

Property Value

string

QuantizationParameter

A video encoding value allowed for composed archiving, smaller values generate higher quality and larger archives, larger values generate lower quality and smaller archives. QuantizationParameter uses a variable bitrate.

public int QuantizationParameter { readonly get; set; }

Property Value

int

Reason

For archives with the status "stopped", this can be set to "maximum duration exceeded", "maximum idle time exceeded", "session ended", "user initiated". For archives with the status "failed", this can be set to "failure".

public readonly string Reason { get; }

Property Value

string

Resolution

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

public readonly RenderResolution Resolution { get; }

Property Value

RenderResolution

SessionId

The session ID of the Vonage Video session you are working with.

public readonly string SessionId { get; }

Property Value

string

Size

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

public readonly long Size { get; }

Property Value

long

Status

The status of the archive: "available" — The archive is available for download from the Vonage Video cloud. "expired" — The archive is no longer available for download from the Vonage Video cloud. "failed" — The archive recording failed. "paused" — When an archive is paused, nothing is recorded. The archive is paused if any of the following conditions occur: No clients are publishing streams to the session. In this case, there is a timeout of 60 minutes, after which the archive stops and the archive status changes to "stopped". All clients disconnect the session. After 60 seconds the archive stops and the archive status changes to "stopped". If a client resumes publishing while the archive is in the "paused" state, the archive recording resumes and the status changes back to "started". "started" — The archive started and is in the process of being recorded. "stopped" — The archive stopped recording. "uploaded" — The archive is available for download from the S3 bucket you specified in your Video API account.

public readonly string Status { get; }

Property Value

string

StreamMode

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

public readonly string StreamMode { get; }

Property Value

string

Streams

The collection of streams.

public readonly Archive.Stream[] Streams { get; }

Property Value

Stream[]

Transcription

The transcription configuration.

[JsonConverter(typeof(MaybeJsonConverter<Transcription>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<Transcription> Transcription { readonly get; set; }

Property Value

Maybe<Transcription>

Url

The download URL of the available archive file. This is only set for an archive with the status set to "available"; for other archives, (including archives with the status "uploaded") this property is set to null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes.

public readonly string Url { get; }

Property Value

string