Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

fix(voice): keep the microphone host open when its status is unreadable

Luis Ortiz3009fa495fab
diff --git a/src/lib/offscreen.ts b/src/lib/offscreen.ts
index 5fa6074..e8537c3 100644
--- a/src/lib/offscreen.ts
+++ b/src/lib/offscreen.ts
@@ -159,7 +159,11 @@ export async function closeVoiceHost(): Promise<void> {
export async function closeVoiceHostIfIdle(): Promise<void> {
if (IS_FIREFOX) return;
const status = await getVoiceStatus().catch(() => null);
- if (status?.recording || status?.transcribing) return;
+ if (!isVoiceStatus(status)) {
+ logger.warn('voice: host status unavailable, leaving the document open');
+ return;
+ }
+ if (status.recording || status.transcribing) return;
await closeOffscreenDocument();
}