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

Add `overrideSave` option to avoid calling `onRecordingComplete` when using `recorderControls`

Open joandvgv opened this issue 2 years ago • 1 comments

Context

Currently, when using the component alongside the useAudioControls hook ( by passing the prop recordingControls), when you discard the recording, it also calls onRecordingComplete.

I'm not sure if this a bug or not, but I created it as a separate option just in case to avoid unwanted behavior on existing implementations.

In our use case, we're using onRecordingComplete to upload the file, and this ends up uploading files that are being discarded!

Changes

  • Added overrideSave option that prevents this from happening
  • Added the option to the type documentation and readme file

Happy to include tests if needed, or just fix the bug in case it is not intended

joandvgv avatar Nov 08 '23 21:11 joandvgv

same here :(

VictorTmelo avatar Dec 19 '23 21:12 VictorTmelo

Please please please merge this pull request. It fixes the issue I have been having for months!

InaaraKalani avatar Jun 26 '24 08:06 InaaraKalani

Hi guys. I made the changes as part of our company fork and no longer work for that company. Since I opened the PR, we kept adding changes, including icons, etc., so I don't think this PR is mergeable as it is.

The owner of the package has not shown interest on getting this merged, so my suggestion is to fork it and move on. If we're interested on getting this as part of the main repository, I'm happy to create a separate PR upon request by the owner.

joandvgv avatar Jul 19 '24 18:07 joandvgv

Hey @joandvgv! Thank you for you interest. And I apologize for not having been able to give time to this project for personal reasons.

I've just looked through the PR and it would be a useful thing to have. If you can then let's please re-open this PR and this merged.

samhirtarif avatar Sep 05 '24 22:09 samhirtarif