getUserMedia and an RTCPeerConnection.
You do not have to remove it to move media onto ClutchCall. captureMicrophone
keeps that exact pipeline. A loopback RTCPeerConnection runs the browser’s
AEC / AGC / noise-suppression and the Opus encoder. A worker
RTCRtpScriptTransform taps the encoded Opus frames. It writes them to a
MoQT audio track over QUIC. WebRTC’s ICE / DTLS / SRTP transport is never used.
Only its capture graph and codec are used.
This is a browser / TypeScript technique. Microphone capture is a
JavaScript-only API. The browser SDK is WebTransport-only, with no WebSocket
fallback rung yet. If you need a TCP/WebSocket fallback today, terminate on
the server-side WebRTC leg instead. See
Browser compatibility.
Tap the mic onto QUIC
- Connect a MoQT client with the encoded-frame rule enforced up front.
- Publish an audio track.
- Give that publication to
captureMicrophone. - Subscribe to the return track and decode it with
OpusPlayer.
- TypeScript
- Python
Reuse a track you already have
Your existing WebRTC app possibly calledgetUserMedia already, or produced a
processed MediaStreamTrack. Pass that track in with track so the browser
does not prompt for the microphone twice. captureMicrophone then skips
acquisition and taps your track directly.
Related
WebRTC diversion
Why we tap WebRTC as a codec/capture layer, not a transport.
RTCRtpScriptTransform
The worker transform that diverts encoded frames.
Migrate from WebRTC
Move an existing WebRTC/SFU app onto QUIC.
Browser audio capture
The full capture + playback surface.

