VAPI-3656: re-attach published streams on websocket reconnect - #15
Open
stampercasey wants to merge 1 commit into
Open
VAPI-3656: re-attach published streams on websocket reconnect#15stampercasey wants to merge 1 commit into
stampercasey wants to merge 1 commit into
Conversation
…tion on reconnect The websocket auto-reconnects and re-emits "init", which rebuilds a fresh, trackless publishing peer connection every time. Nothing replayed the already-published local streams onto it, so a server-forced reconnect (e.g. during a gateway deploy) silently dropped outgoing audio and left the endpoint stuck ineligible for new calls.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Summary
init, which rebuilds a fresh, trackless publishingRTCPeerConnectionevery time.MediaStreams onto the new peer connection, so the mic never got re-attached - the endpoint silently dropped outgoing audio and got stuck permanently ineligible for new calls on the gateway side.init()now checkspublishedStreams: if non-empty, it re-attaches each stream viaaddStreamToPublishingPeerConnectionand renegotiates withofferPublishSdp. No-op on a first connect sincepublishedStreamsis empty then.Test plan
npm test- full suite passes (73/73), including two new cases covering first-connect (no-op) and reconnect (replay) behaviornpm run build- cleanJira: VAPI-3656