feat: Add Base64 Audio Config to Video API Audio Connector implementation - #360
Open
superchilled wants to merge 4 commits into
Open
feat: Add Base64 Audio Config to Video API Audio Connector implementation#360superchilled wants to merge 4 commits into
superchilled wants to merge 4 commits into
Conversation
superchilled
requested review from
dragonmantank
and
a lite review from Copilot
August 19, 2026 15:18
There was a problem hiding this comment.
Pull request overview
Adds support for configuring audio_transport within the Video API Audio Connector WebSocket configuration so callers can send an audioTransport object in the request payload.
Changes:
- Expanded
WebSocket#connectunit test coverage to includeaudio_transportoptions. - Updated
Vonage::Keys.camelcaseexception handling soaudio_transportis converted toaudioTransport. - Added YARD documentation for
:audio_transportoptions onWebSocket#connect.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/vonage/video/web_socket_test.rb | Extends request/parameter expectations for audio_transport in connect. |
| lib/vonage/video/web_socket.rb | Documents newly supported :audio_transport configuration options. |
| lib/vonage/keys.rb | Ensures audio_transport is camel-cased to audioTransport in outgoing payloads. |
Suppressed comments (1)
test/vonage/video/web_socket_test.rb:73
- The client-side
websocketoptions passed intoconnectuse snake_case for nestedaudio_transportkeys, but other nested option hashes in this SDK are expected to use the API's camelCase keys (seetranscription_propertiesusage intest/vonage/video/archives_test.rb:55-63). Aligning these keys avoids ambiguity about whether the SDK will deep-camelcase nested hashes.
transport: 'json',
encoding: 'base64',
audio_field: 'audio',
receive_audio_field: 'audio',
static_fields: {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+43
to
+47
| # @option websocket[:audio_transport] [String] :transport (optional) The transport type for the audio data. Must be one of: "json", "binary". | ||
| # @option websocket[:audio_transport] [String] :encoding (optional) The encoding type for the audio data. Required when transport is "json". Must be one of: "base64". | ||
| # @option websocket[:audio_transport] [String] :audio_field (optional) The JSON key for the outbound audio data. The default value is "audio". | ||
| # @option websocket[:audio_transport] [String] :receive_audio_field (optional) The JSON key for inbound audio data (when bidirectional is enabled). Defaults to the same value as `audio_field`. | ||
| # @option websocket[:audio_transport] [Hash] :static_fields (optional) An optional hash of extra key-value pairs included in every outbound JSON audio message. |
Comment on lines
+46
to
+50
| transport: 'json', | ||
| encoding: 'base64', | ||
| audio_field: 'audio', | ||
| receive_audio_field: 'audio', | ||
| static_fields: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the
audio_transportparams within an Audio Connector Websocket configuration in the Video API implementation. Specifically it:camelcasemethod of theKeysmodule to include theaudio_transportparamThis PR completes https://jira.vonage.com/browse/DEVX-11291