llfbandit / record

Audio recorder from microphone to a given file path. No external dependencies, MediaRecorder is used for Android an AVAudioRecorder for iOS.
https://pub.dev/packages/record
235 stars 200 forks source link

On Safari or any browser on IOS no sound output #303

Closed MilanHofmann closed 4 months ago

MilanHofmann commented 6 months ago

Package version 5.0.5

Environment

Describe the bug

Audios recorded on Safari MacOS or any browser on IOS are empty - no amplitude changes as well.

final record = AudioRecorder(); await record.start( const RecordConfig( encoder: AudioEncoder.wav, ), path: _fileName!); To Reproduce Start recording on Safari MacOS or any browser on IOS. The recorded audio has no sound. Same thing on Chrome on MacOS works well.

Expected behavior

Records sound on IOS Browsers or MacOS Safari.

llfbandit commented 4 months ago

record_web 1.1.0 has been released. I didn't any issue in this version.

negahdaripour commented 1 month ago

I am using record: ^5.1.2 which in turn uses record_web: ^1.1.3. And in iOS browsers(Chrome/Safari), basically an empty file is generated. I send the file to server and when I get it back, Content-Length in Header is always 44, no matter how many seconds the original audio has been. The issue happens with AudioEncoder.wav. Based on the documentation, I assumed it was safe to use.