samhirtarif / react-audio-recorder

An audio recording helper for React. Provides a component and a hook to help with audio recording.
https://www.npmjs.com/package/react-audio-voice-recorder
223 stars 64 forks source link

Wrong format in IOS devices #82

Open Ali-Ak-98 opened 1 year ago

Ali-Ak-98 commented 1 year ago

In IOS devices, downloaded file format is .mp4 and I could not detect why this happens. Please help me if anyone had similar issue.

samhirtarif commented 1 year ago

@Ali-Ak-98 - I've tested this before and have always got webm, unless explicitly transformed into another format.

Could you share which device, iOS version and browser you're using?

samhirtarif commented 1 year ago

Regardless of that, have you tried sending mimeType as audio/webm in the mediaRecorderOptions of the AudioRecorder component in case you want it to be webm?

Ali-Ak-98 commented 1 year ago

@Ali-Ak-98 - I've tested this before and have always got webm, unless explicitly transformed into another format.

Could you share which device, iOS version and browser you're using?

I'm using iOS 16.6 and test with both chrome and safari

Ali-Ak-98 commented 1 year ago

Regardless of that, have you tried sending mimeType as audio/webm in the mediaRecorderOptions of the AudioRecorder component in case you want it to be webm?

I tried this but not worked. Also tried to debug and detect the problem, inside the "onRecordingComplete" function I alert the blob.type , and I got 'Audio/mp4' !!!!

zem-aleks commented 1 year ago

The same problem

juliandierker commented 1 year ago

is there any support for Safari < v17 ? atm this recorder only supports webm and this makes it unusable for safari users which are not on the latest > 17 version. could you please make it downwards compatible or allow to use mp3 as file format?

zem-aleks commented 1 year ago

I resolved this problem with the recorder polyfill: https://github.com/ai/audio-recorder-polyfill

OfficialAshwaniBhardwaj commented 5 months ago

I resolved this problem with the recorder polyfill: https://github.com/ai/audio-recorder-polyfill

any solution for chrome?