Struct CreateArchiveRequest
- Namespace
- Vonage.Video.Archives.CreateArchive
- Assembly
- Vonage.dll
Represents a request to creating an archive.
[Builder(new string[] { "Vonage.Server" })]
public readonly struct CreateArchiveRequest : IVonageRequest, IHasApplicationId, IHasSessionId
- Implements
- Inherited Members
Properties
ApplicationId
The Vonage Application UUID.
[JsonIgnore]
[Mandatory(0)]
public Guid ApplicationId { get; }
Property Value
HasAudio
Disables audio recording for the archive. By default, audio is recorded. If you disable both audio and video, the request results in an error.
[JsonPropertyOrder(1)]
[OptionalBoolean(true, "DisableAudio")]
public bool HasAudio { get; }
Property Value
Examples
.DisableAudio()
HasTranscription
Enables transcription of the audio of the session. Disabled by default.
[JsonPropertyOrder(11)]
[OptionalBoolean(false, "EnableTranscription")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool HasTranscription { get; }
Property Value
Examples
.EnableTranscription()
HasVideo
Disables video recording for the archive. By default, video is recorded. If you disable both audio and video, the request results in an error.
[JsonPropertyOrder(2)]
[OptionalBoolean(true, "DisableVideo")]
public bool HasVideo { get; }
Property Value
Examples
.DisableVideo()
Layout
Sets the archive's layout.
[JsonPropertyOrder(3)]
[JsonConverter(typeof(MaybeJsonConverter<Layout>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<Layout> Layout { get; }
Property Value
Examples
.WithLayout(new Layout(null, null, LayoutType.BestFit))
MaxBitrate
Sets the maximum video bitrate for the archive, in bits per second. Only valid for composed archives. Valid range: 1,000,000 to 6,000,000. This maximum applies to the video bitrate only; audio bits are excluded from the limit.
[JsonPropertyOrder(9)]
[JsonConverter(typeof(MaybeJsonConverter<int>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<int> MaxBitrate { get; }
Property Value
Examples
.WithMaxBitrate(2000000)
MultiArchiveTag
Sets a unique tag to support recording multiple archives for the same session simultaneously. 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.
[JsonPropertyOrder(8)]
[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> MultiArchiveTag { get; }
Property Value
Examples
.WithMultiArchiveTag("my-multi-archive")
Name
Sets the name of the archive (for your own identification).
[JsonPropertyOrder(4)]
[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> Name { get; }
Property Value
Examples
.WithName("My Archive")
OutputMode
Sets whether all streams in the archive are recorded to a single file ("composed", the default) or to individual files ("individual").
[JsonPropertyOrder(5)]
[JsonConverter(typeof(MaybeJsonConverter<OutputMode>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[OptionalWithDefault("OutputMode", "OutputMode.Composed")]
public Maybe<OutputMode> OutputMode { get; }
Property Value
Examples
.WithOutputMode(OutputMode.Individual)
QuantizationParameter
Sets the quantization parameter (QP) for composed archives. Smaller values (min 15) generate higher quality and larger archives; larger values (max 40) generate lower quality and smaller archives. Uses variable bitrate (VBR).
[JsonPropertyOrder(10)]
[JsonConverter(typeof(MaybeJsonConverter<int>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<int> QuantizationParameter { get; }
Property Value
Examples
.WithQuantizationParameter(25)
Resolution
Sets the resolution of the archive. Only applies to composed archives. If you set this and set the outputMode to "individual", the request results in an error. Available resolutions: "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait).
[JsonPropertyOrder(6)]
[JsonConverter(typeof(MaybeJsonConverter<RenderResolution>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<RenderResolution> Resolution { get; }
Property Value
Examples
.WithResolution(RenderResolution.HighDefinitionLandscape)
SessionId
The session Id.
[JsonPropertyOrder(0)]
[Mandatory(1)]
public string SessionId { get; }
Property Value
StreamMode
Sets whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). In manual mode, you specify streams to be included and whether a stream's audio, video, or both are included. In composed archives, the archive composer includes streams based on stream prioritization rules.
[JsonPropertyOrder(7)]
[JsonConverter(typeof(MaybeJsonConverter<StreamMode>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[OptionalWithDefault("StreamMode", "StreamMode.Auto")]
public Maybe<StreamMode> StreamMode { get; }
Property Value
Examples
.WithStreamMode(StreamMode.Manual)
Transcription
Sets the transcription configuration.
[JsonPropertyOrder(12)]
[JsonPropertyName("transcriptionProperties")]
[JsonConverter(typeof(MaybeJsonConverter<TranscriptionProperties>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<TranscriptionProperties> Transcription { get; }
Property Value
Examples
.WithTranscription(new TranscriptionProperties { PrimaryLanguageCode = "en-US", HasSummary = true })
Methods
Build()
public static IBuilderForApplicationId Build()
Returns
BuildRequestMessage()
Converts the request to a HttpRequest.
public HttpRequestMessage BuildRequestMessage()
Returns
- HttpRequestMessage
The Http request.