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

is there a way to stop currently playing audio while starting to play another

Open shebisabeen opened this issue 3 years ago • 1 comments

I am trying to make a simple chat with audio file sharing. The user is able to play multiple audios at the same time, which overlaps the audios. Is there an option to stop currently playing audio while the user starts to play another audio?

shebisabeen avatar Feb 21 '22 07:02 shebisabeen

If you have multiple instances of this component for each voice note, I would rely on a global state to ensure that only one audio is being played at a time.

ItsLaro avatar Jul 14 '22 00:07 ItsLaro