fix(call): allow joining a WebRTC call without a microphone#608
fix(call): allow joining a WebRTC call without a microphone#608HexaField wants to merge 1 commit into
Conversation
The join flow blocked users without mic access from entering a call at
all. `JoinCallControls.vue` disabled the Join button whenever
`stream.value.getAudioTracks().length === 0`, and `createStream()` threw
hard when `getUserMedia({ audio: true, ... })` was denied — so a user
with the mic blocked at the OS / browser level (or who'd revoked
permission) was stuck on the join screen with a red warning telling them
to enable a mic.
There's no architectural reason for that gate. SimplePeer accepts
`stream: undefined`, `SfuManager.join()` just iterates the local stream's
tracks (none = nothing to add), and every track-add path in
`webrtcStore.ts` already guards on `localStream.value`.
This change drops the gate and adds a graceful fallback chain:
* `mediaDevicesStore.createStream()` — on a `NotAllowed` /
`NotFound` / `NotReadable` / `OverconstrainedError` from the first
`getUserMedia` call, retry without audio. If that also fails (or if the
user wasn't requesting video either), surface a `null` stream and reset
the audio/video toggles to match.
* `JoinCallControls.vue` — the Join button is only disabled while the
stream is still being acquired (`streamLoading`). The audio warning
stays but is reworded to be informational: "you can still join and
listen — enable a microphone if you'd like to speak" instead of "you
cannot join."
The user experience is now: silent join works (listener mode), unmuting
later is one toggle away if they grant permission, and the failure mode
of "I can't get my mic to work, so I can't even hear anyone else" is
gone.
✅ Deploy Preview for fluxsocial-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
More reviews will be available in 56 minutes and 40 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Users without microphone access were blocked from joining calls. The Join button was disabled whenever `stream.value.getAudioTracks().length === 0`, and `createStream()` threw hard when `getUserMedia({ audio: true, ... })` was denied. Net effect: anyone with the mic blocked at the OS / browser level (or who had revoked permission) was stuck on the join screen with a red "Audio is disabled — please enable a microphone in the browser to join the call" warning.
There's no architectural reason for that gate. SimplePeer accepts `stream: undefined`, the SFU join path just iterates the local stream's tracks (none = nothing to add), and every track-add path in `webrtcStore.ts` already guards on `localStream.value`.
Changes
Test plan