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
UriUriA publicly reachable WebSocket URI to be used for the destination of the audio stream
Streamsstring[]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.
HeadersDictionary<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.
AudioRateSupportedAudioRatesA number representing the audio sampling rate in Hz.
BidirectionalboolEnables bidirectional audio on the websocket..
Properties
AudioRate
A number representing the audio sampling rate in Hz.
public SupportedAudioRates AudioRate { get; init; }
Property Value
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
Bidirectional
Enables bidirectional audio on the websocket..
public bool Bidirectional { get; init; }
Property Value
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
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; }