Package com.vonage.client.video
Class ConnectRequest.Builder
java.lang.Object
com.vonage.client.video.ConnectRequest.Builder
- Enclosing class:
ConnectRequest
Builder for defining the fields in a ConnectRequest object.
-
Method Summary
Modifier and TypeMethodDescriptionaudioRate(Websocket.AudioRate audioRate) A number representing the audio sampling rate in Hz.build()Builds the ConnectRequest object.Key-value pairs of headers to be sent to your WebSocket server with each message, with a maximum length of 512 bytes.The Vonage Video session ID that includes the Vonage Video streams you want to include in the WebSocket stream.(OPTIONAL) An array of stream IDs for the Vonage Video streams you want to include in the WebSocket audio.streams(Collection<String> streams) A collection of stream IDs for the Vonage Video streams you want to include in the WebSocket audio.(REQUIRED) A valid Vonage Video token for the Audio Connector connection to the Vonage Video Session.(REQUIRED) A publicly reachable WebSocket URI to be used for the destination of the audio stream.
-
Method Details
-
token
(REQUIRED) A valid Vonage Video token for the Audio Connector connection to the Vonage Video Session. You can add additional data to the JWT to identify that the connection is the Audio Connector endpoint or for any other identifying data.- Parameters:
token- The Base64-encoded JWT as a string.- Returns:
- This builder.
-
sessionId
The Vonage Video session ID that includes the Vonage Video streams you want to include in the WebSocket stream. The Audio Connector feature is only supported in routed sessions.- Parameters:
sessionId- The session ID as a string.- Returns:
- This builder.
-
uri
(REQUIRED) A publicly reachable WebSocket URI to be used for the destination of the audio stream. This must start with thews://orwss://protocol.- Parameters:
uri- The WebSocket URI as a string.- Returns:
- This builder.
-
streams
(OPTIONAL) 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.- Parameters:
streams- The stream IDs to include in the audio.- Returns:
- This builder.
-
streams
A collection 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.- Parameters:
streams- The stream IDs to include in the audio connection.- Returns:
- This builder.
-
headers
Key-value pairs of headers to be sent to your WebSocket server with each message, with a maximum length of 512 bytes.- Parameters:
headers- The custom request headers as a Map.- Returns:
- This builder.
-
audioRate
A number representing the audio sampling rate in Hz.- Parameters:
audioRate- The sampling rate as an enum.- Returns:
- This builder.
-
build
Builds the ConnectRequest object.- Returns:
- The ConnectRequest object with this builder's settings.
-