Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: Fail to open console with Firefox #4816 (#4838)

balibabufa5c7edab4e5
diff --git a/web/src/components/message-item/hooks.ts b/web/src/components/message-item/hooks.ts
index f6004699ba..f77da05011 100644
--- a/web/src/components/message-item/hooks.ts
+++ b/web/src/components/message-item/hooks.ts
@@ -67,7 +67,9 @@ export const useSpeech = (content: string, audioBinary?: string) => {
setIsPlaying(false);
},
onChunkEnd: () => {},
- mimeType: 'audio/mpeg',
+ mimeType: MediaSource.isTypeSupported('audio/mpeg')
+ ? 'audio/mpeg'
+ : 'audio/mp4; codecs="mp4a.40.2"', // https://stackoverflow.com/questions/64079424/cannot-replay-mp3-in-firefox-using-mediasource-even-though-it-works-in-chrome
});
await player.current.init();
}, []);