From 3c511e619e8144609e464d0001c6b1df48839235 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sat, 12 Oct 2024 11:51:36 +1300 Subject: [PATCH] use correct mime type for audio blob --- src/frontend/js/MicrophoneRecorder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/js/MicrophoneRecorder.js b/src/frontend/js/MicrophoneRecorder.js index 2b4f73e..4230ce7 100644 --- a/src/frontend/js/MicrophoneRecorder.js +++ b/src/frontend/js/MicrophoneRecorder.js @@ -49,7 +49,9 @@ class MicrophoneRecorder { } // create blob from audio chunks - const blob = new Blob(this.audioChunks, { type: "audio/ogg; codecs=opus" }); + const blob = new Blob(this.audioChunks, { + type: this.mediaRecorder.mimeType, // likely to be "audio/webm;codecs=opus" in chromium + }); // resolve promise resolve(blob);