Skip to content

Recorder don't stop with setSubscriptionDuration #505

Description

@v1puj

In React native app, I have used to record audio but it is not stopping the recorder when i use setSubscriptionDuration on start.
player is increasing with +50. to solve this I have used setSubscriptionDuration but UI is hanged and not able to stop the recording. touch on any button is not working.

const onStartRecord = async () => {
    audioRecorderPlayer.setSubscriptionDuration(0.1);
    setIsAudioClicked(true);
    await audioRecorderPlayer.startRecorder();

    audioRecorderPlayer.addRecordBackListener((e: any) => {
      setRecordSecs(e.currentPosition);
      setRecordTime(audioRecorderPlayer.mmssss(Math.floor(e.currentPosition)))
    });
    };
const onStopRecord = async () => {
    setIsAudioClicked(false);
    const audio = await audioRecorderPlayer.stopRecorder();
    audioRecorderPlayer.removeRecordBackListener();
    setRecordSecs(0);
    };

Please help to stop the recorder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working🤖 ai-managedHandled by the AI-native maintenance workflow

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions