fix(web): mic-loss recovery uses 'could not be restored' for unclassified errors

This commit is contained in:
Jannis Braun
2026-05-03 01:35:07 +02:00
parent 63bf9e684c
commit 8907bb305d
+4 -2
View File
@@ -433,7 +433,7 @@ export function useLiveKit() {
if (roomRef.current !== subscriberRoom || !subscriberRoom) return;
const deviceId = useVoiceStore.getState().inputDeviceId;
let copy = 'Microphone unavailable';
let copy = 'Microphone could not be restored';
try {
const probe = await navigator.mediaDevices.getUserMedia({
@@ -449,7 +449,7 @@ export function useLiveKit() {
await republishMicrophone(subscriberRoom, lastMicGenRef);
return;
} catch {
copy = 'Microphone could not be restored';
// copy already holds 'Microphone could not be restored'
}
} catch (err: any) {
if (err?.name === 'NotAllowedError') {
@@ -464,6 +464,8 @@ export function useLiveKit() {
} else {
copy = 'Microphone disconnected';
}
} else {
copy = 'Microphone could not be restored';
}
}