fix: allow microphone access for voice memos in PWA

Permissions-Policy blocked getUserMedia; allow microphone on same origin like camera.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 17:18:49 +02:00
parent 91cf2674f7
commit 9ae24aa6fb
2 changed files with 7 additions and 3 deletions
@@ -116,6 +116,10 @@ export default function LiveVoiceCapture({
const startRecording = async () => {
setMicError(null)
chunksRef.current = []
if (!navigator.mediaDevices?.getUserMedia) {
setMicError(t('logs.live_voice_mic_denied'))
return
}
try {
const stream = await navigator.mediaDevices.getUserMedia({ audio: true })
streamRef.current = stream