Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to listen to the audio while it's paused like WhatsApp? #199

Open
Muhammad-Gamal2 opened this issue Mar 21, 2023 · 5 comments
Open

How to listen to the audio while it's paused like WhatsApp? #199

Muhammad-Gamal2 opened this issue Mar 21, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@Muhammad-Gamal2
Copy link

I want the user to listen to the audio without stopping the recording only pausing it so that he can continue recording.

@Muhammad-Gamal2 Muhammad-Gamal2 added the enhancement New feature or request label Mar 21, 2023
@ujas-m-simformsolutions
Copy link
Collaborator

You can do it by calling recorderController.pause() whenever user taps to play the audio and whenever you pause/stop the playing audio then you call recorderController.record() again recording will start where it left of. All parameter for record are ignored if called after pausing.

If this doesn't resolve your issue please provide your implementation so that we can help you.

@ujas-m-simformsolutions ujas-m-simformsolutions added waiting-for-response Waiting for someone to respond. more-info-required Indicates that the issue requires more description/information in triage The issue is being triaged and removed enhancement New feature or request more-info-required Indicates that the issue requires more description/information labels Mar 21, 2023
@Muhammad-Gamal2
Copy link
Author

Muhammad-Gamal2 commented Mar 21, 2023

I want to listen to the same audio while recording it, if it paused

I already do this but it started a new record every time.
Here is my code

final appDirectory = await getApplicationDocumentsDirectory();
final path = "${appDirectory.path}/recording.m4a";
final controller = await RecorderController().record(path:path);

then calling to pause
controller.pause(); or controller.stop(false);

then initialize the player controller
final player = PlayerController();
await player.preparePlayer( path: path ?? '', volume: 1, noOfSamples: 40,);

then start recording again
controller?.record(path:path)

@ujas-m-simformsolutions ujas-m-simformsolutions removed the waiting-for-response Waiting for someone to respond. label Mar 24, 2023
@Muhammad-Gamal2
Copy link
Author

@ujas-m-simformsolutions is there any update?

@ujas-m-simformsolutions
Copy link
Collaborator

Right now it's not possible. Putting it under enhancement.

@ujas-m-simformsolutions ujas-m-simformsolutions added enhancement New feature or request and removed in triage The issue is being triaged labels Apr 14, 2023
@Anikets08
Copy link

Instead of pausing it you can just stop it get the path of the audio and play it if the user wants and when they record again and stop append it to the list of path and at last when user is satisfied you can merge it using ffmpeg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants