From 8ffc3d746f20007e9eb4e3ae4f152f383bc371e1 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 9 May 2026 04:22:46 +0900 Subject: [PATCH] refac --- src/lib/components/chat/MessageInput/VoiceRecording.svelte | 2 +- src/lib/utils/audio.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput/VoiceRecording.svelte b/src/lib/components/chat/MessageInput/VoiceRecording.svelte index fc6e32cf59..b0d19d0ddb 100644 --- a/src/lib/components/chat/MessageInput/VoiceRecording.svelte +++ b/src/lib/components/chat/MessageInput/VoiceRecording.svelte @@ -238,7 +238,7 @@ return; } - const mineTypes = ['audio/webm; codecs=opus', 'audio/mp4']; + const mineTypes = ['audio/webm; codecs=opus', 'audio/webm', 'audio/ogg; codecs=opus', 'audio/mp4', 'audio/wav']; mediaRecorder = new MediaRecorder(stream, { mimeType: mineTypes.find((type) => MediaRecorder.isTypeSupported(type)) diff --git a/src/lib/utils/audio.ts b/src/lib/utils/audio.ts index 94da18af67..de36c9f9f2 100644 --- a/src/lib/utils/audio.ts +++ b/src/lib/utils/audio.ts @@ -80,7 +80,8 @@ export class AudioQueue { #halt() { this.audio.pause(); this.audio.currentTime = 0; - this.audio.src = ''; + this.audio.removeAttribute('src'); + this.audio.load(); this.queue = []; this.current = null; }