Table of Contents

Class WebSocket

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

Represents a websocket configuration.

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

Constructors

WebSocket(Uri, string[], Dictionary<string, string>, SupportedAudioRates, bool)

Represents a websocket configuration.

public WebSocket(Uri Uri, string[] Streams, Dictionary<string, string> Headers, SupportedAudioRates AudioRate, bool Bidirectional)

Parameters

Uri Uri

A publicly reachable WebSocket URI to be used for the destination of the audio stream

Streams string[]

An array of stream IDs for the Vonage Video streams you want to include in the WebSocket audio. If you omit this property, all streams in the session will be included.

Headers Dictionary<string, string>

An object of key-value pairs of headers to be sent to your WebSocket server with each message, with a maximum length of 512 bytes.

AudioRate SupportedAudioRates

A number representing the audio sampling rate in Hz.

Bidirectional bool

Enables bidirectional audio on the websocket..

Properties

AudioRate

A number representing the audio sampling rate in Hz.

public SupportedAudioRates AudioRate { get; init; }

Property Value

SupportedAudioRates

AudioTransport

Configures how audio is serialized on the WebSocket wire. By default, audio is sent as raw binary PCM 16-bit frames.

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

Property Value

Maybe<AudioTransport>

Bidirectional

Enables bidirectional audio on the websocket..

public bool Bidirectional { get; init; }

Property Value

bool

Headers

An object of key-value pairs of headers to be sent to your WebSocket server with each message, with a maximum length of 512 bytes.

public Dictionary<string, string> Headers { get; init; }

Property Value

Dictionary<string, string>

Streams

An array of stream IDs for the Vonage Video streams you want to include in the WebSocket audio. If you omit this property, all streams in the session will be included.

public string[] Streams { get; init; }

Property Value

string[]

Uri

A publicly reachable WebSocket URI to be used for the destination of the audio stream

public Uri Uri { get; init; }

Property Value

Uri