react-media-recorder icon indicating copy to clipboard operation
react-media-recorder copied to clipboard

Using audio/wav is throwing an error

Open AsemKakhi opened this issue 3 years ago • 4 comments

You already using the extendable-media-recorder library as a dependency, which adds the support of using "audio/wav" for audio recording. but this line of code is throwing an error when I set the { mimeType: "audio/wav"}

if (!MediaRecorder.isTypeSupported(mediaRecorderOptions.mimeType)) {
  console.error(
    `The specified MIME type you supplied for MediaRecorder doesn't support this browser`,
  );
}

because "audio/wav" is not natively a supported format by the browser

Please consider fixing this I would suggest something like:

if (!MediaRecorder.isTypeSupported(mediaRecorderOptions.mimeType) && mediaRecorderOptions.mimeType.toLowerCase() !== "audio/wav") {
  console.error(
    `The specified MIME type you supplied for MediaRecorder doesn't support this browser`,
  );
}

AsemKakhi avatar Jun 02 '22 08:06 AsemKakhi

We have the same issue

StianHaugland1 avatar Jun 15 '22 05:06 StianHaugland1

Facing this issue as well

santiarr avatar Feb 13 '24 01:02 santiarr