From 8a72ad45eea3850d4d2e718118f15d34c1257d79 Mon Sep 17 00:00:00 2001 From: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com> Date: Tue, 29 Sep 2026 11:33:49 +0000 Subject: [PATCH] Allow joining when the camera or microphone is missing 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. --- app/components/EnsurePermissions.tsx | 14 ++--- app/utils/requestMediaPermissions.test.ts | 72 +++++++++++++++++++++++ app/utils/requestMediaPermissions.ts | 63 ++++++++++++++++++++ 3 files changed, 140 insertions(+), 9 deletions(-) create mode 100644 app/utils/requestMediaPermissions.test.ts create mode 100644 app/utils/requestMediaPermissions.ts diff --git a/app/components/EnsurePermissions.tsx b/app/components/EnsurePermissions.tsx index 73ee39dd..1e2ed1f8 100644 --- a/app/components/EnsurePermissions.tsx +++ b/app/components/EnsurePermissions.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef, useState, type ReactNode } from 'react' +import { requestMediaPermissions } from '~/utils/requestMediaPermissions' import { Button } from './Button' export interface EnsurePermissionsProps { @@ -61,18 +62,13 @@ export function EnsurePermissions(props: EnsurePermissionsProps) {