diff --git a/frontend/src/hooks/useConversation.ts b/frontend/src/hooks/useConversation.ts index 29507bd..abb403e 100644 --- a/frontend/src/hooks/useConversation.ts +++ b/frontend/src/hooks/useConversation.ts @@ -193,6 +193,12 @@ export function useConversation() { // ── Audio ── const startRecording = useCallback(async () => { + // Check if mediaDevices is available (requires HTTPS/localhost) + if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) { + addMessage('kira', 'Your browser needs HTTPS to use the microphone. Try accessing Kira through the HTTPS address instead!'); + return; + } + try { const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); streamRef.current = stream;