fix: fix old iOS device voice recording

This commit is contained in:
Shirasawa
2025-06-05 20:22:20 +08:00
committed by GitHub
parent 53764fe648
commit 07b2ecf6aa

View File

@@ -205,8 +205,10 @@
return;
}
const mineTypes = ['audio/webm; codecs=opus', 'audio/mp4'];
mediaRecorder = new MediaRecorder(stream, {
mimeType: 'audio/webm; codecs=opus'
mimeType: mineTypes.find((type) => MediaRecorder.isTypeSupported(type))
});
mediaRecorder.onstart = () => {