Table of Contents

Class AudioTransport

Namespace
Vonage.Video.AudioConnector.Start
Assembly
Vonage.dll

Represents the configuration for how audio is serialized on the WebSocket wire.

public record AudioTransport : IEquatable<AudioTransport>
Inheritance
AudioTransport
Implements
Inherited Members

Properties

AudioField

The JSON key for the outbound audio data. Defaults to 'audio'.

[JsonPropertyName("audio_field")]
[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> AudioField { get; init; }

Property Value

Maybe<string>

Encoding

Encoding format. Required when Transport is Json. Set to 'base64'.

[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> Encoding { get; init; }

Property Value

Maybe<string>

ReceiveAudioField

The JSON key for inbound audio data when bidirectional is enabled. Defaults to the same value as AudioField.

[JsonPropertyName("receive_audio_field")]
[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> ReceiveAudioField { get; init; }

Property Value

Maybe<string>

StaticFields

Extra key-value pairs included in every outbound JSON audio message.

[JsonPropertyName("static_fields")]
[JsonConverter(typeof(MaybeJsonConverter<Dictionary<string, string>>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<Dictionary<string, string>> StaticFields { get; init; }

Property Value

Maybe<Dictionary<string, string>>

Transport

Serialization format: 'binary' (raw PCM16, the default) or 'json'.

[JsonConverter(typeof(EnumDescriptionJsonConverter<AudioTransportType>))]
public AudioTransportType Transport { get; init; }

Property Value

AudioTransportType