Repository navigation
Allow joining when the camera or microphone is missing - #222
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
The permission prompt asked for camera and microphone in one getUserMedia call. When either device is missing the call rejects with NotFoundError, and the page treated that as a refusal and showed 'Permission denied'. Fall back to each device on its own and only show the denied page when the user refuses.
Collaborator
|
Sorry for my pretty basic question, but why would anyone without a camera and microphone be interested in joining a video meeting? This meeting tool doesn't even a chat feature yet, so the participant would have no way to communicate with the meeting participants at all. |
Author
|
Hey, transparency upfront this PR was part of a barrage that claude did without consulting me. I did not intend to have claude push 350 ish PRs in one day without my review. Now regarding why someone would join a meeting without either, maybe they're in a hurry and will plug their earpods a few seconds in but want to show up on time 😅 Can't say I wouldn't relate |
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.
Title: Allow joining when the camera or microphone is missing
Fixes #165
Problem
The "Allow access" button calls
getUserMedia({ audio: true, video: true })once. When the machine has no camera or no microphone, the browser rejects the call withNotFoundError. The.catchtreats every rejection as a refusal, so the page shows "Permission denied" and the user cannot enter the room. A listen-only participant with neither device is blocked the same way.Fix
Move the request into
requestMediaPermissions:NotAllowedErrororSecurityError, request the microphone and the camera separately and use whichever succeed, including neither.EnsurePermissionscalls the helper and no longer indexesgetAudioTracks()[0]orgetVideoTracks()[0], which throw when a device is missing.Tests
app/utils/requestMediaPermissions.test.tscovers both devices present, microphone only, camera only, neither device, and a refusal.With the previous single-call behavior in the helper, three tests fail (microphone only, camera only, neither). With the fix, all five pass.
tsc,eslintandprettier --checkare clean for the changed files.