react-audio-player
react-audio-player copied to clipboard
is there a way to stop currently playing audio while starting to play another
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?
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.