Skip to content

stream available and unavailable events#5

Open
smoghe-bw wants to merge 17 commits into
mainfrom
metadata-for-stream-events
Open

stream available and unavailable events#5
smoghe-bw wants to merge 17 commits into
mainfrom
metadata-for-stream-events

Conversation

@smoghe-bw

Copy link
Copy Markdown

No description provided.

@smoghe-bw smoghe-bw requested review from a team as code owners April 27, 2026 13:29
@bwappsec

bwappsec commented Apr 27, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

smoghe-bw added 3 commits April 27, 2026 10:29
Emit connectStatus event separately from ready so callers can
subscribe to connect status updates independently via onConnectStatus.
@smoghe-bw smoghe-bw changed the title feat: add connectStatus to readyMetadata on connectStatus event VAPI-2525 feat: add connectStatus to readyMetadata on connectStatus event Apr 27, 2026
smoghe-bw and others added 8 commits June 2, 2026 09:25
…reamAvailable callback

- RtcStream.mediaStream and callId are now optional: notification fires first
  with callId (no mediaStream) for call-arrival UI, then again via WebRTC
  ontrack with mediaStream when audio flows
- signaling.ts subscribes to streamAvailable/streamUnavailable WS events and
  emits them for BandwidthRtc to forward to the app's handler
- Adds acceptStream(callId?) and declineStream(callId?) on BandwidthRtc and
  Signaling so apps can explicitly accept or decline an inbound stream
- Non-null assertions on setMicEnabled/setCameraEnabled/unpublish callers that
  always pass publish()-originated streams

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Delegates to v1 BandwidthRtcV1.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Without an explicit types entry, CRA's compiler couldn't resolve
declaration files from the dist/ directory via the npm link symlink.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…consumers

When installed via file: reference, CRA's source-map-loader follows relative
paths in .js.map files that escape the project root through the symlink,
causing ENOENT. Disabling source maps removes the .map files entirely.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Backwards compatibility shim: if the app never calls onStreamAvailable,
the gateway's new closed-gate-between-calls behavior would silently break
audio on all calls after the first. Auto-accepting keeps existing apps
working without any code change on their side.

Apps that register onStreamAvailable get the new ring/accept UX and are
responsible for calling acceptStream explicitly.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Gateway now opens the EgressGate at streamAvailable send time, so old SDKs
that never call acceptStream are unaffected. The SDK-side shim is no longer
needed.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Dead code from before the peerType-based offerSdp was adopted.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@smoghe-bw smoghe-bw changed the title VAPI-2525 feat: add connectStatus to readyMetadata on connectStatus event stream available and unavailable events Jun 2, 2026
smoghe-bw and others added 5 commits June 2, 2026 10:48
Build was blocked by a prettier check on the tsconfig. No logic changes;
prettier --write reformatted the file so npm run build can proceed.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…rences

Defaults to true. When true the gateway immediately re-opens the egress gate
after each call ends, so the next call's audio flows without any round-trip
delay. Pass false to restore legacy behaviour (gate stays closed until
streamAvailable is processed by the gateway).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…mNotification callback

Previously the signaling-layer streamAvailable WS event was routed through
onStreamAvailable, which fires before the WebRTC ontrack event arrives and
therefore has no mediaStream. This broke existing consumers who assume
onStreamAvailable always carries a populated mediaStream.

Introduce onInboundStreamNotification as the dedicated callback for the
pre-media gateway notification (carries callId/autoAccepted, no mediaStream).
onStreamAvailable continues to fire only from the WebRTC ontrack handler,
so mediaStream is always present and existing consumers are unaffected.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…undStreamNotification callback"

This reverts commit e587b4d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants