Skip to content

Commit fe15e4d

Browse files
committed
fix: add defense-in-depth mobile check in voice start()
Ensures start() is a no-op on mobile even if somehow called directly, complementing the UI-layer shouldShowUI guards.
1 parent 5d71600 commit fe15e4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/hooks/useVoiceInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function useVoiceInput(options: UseVoiceInputOptions): UseVoiceInputResul
8282
}, []);
8383

8484
const start = useCallback(async () => {
85-
if (!isSupported || state !== "idle" || !callbacksRef.current.openAIKeySet) return;
85+
if (!isSupported || isMobile || state !== "idle" || !callbacksRef.current.openAIKeySet) return;
8686

8787
try {
8888
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });

0 commit comments

Comments
 (0)