SimformSolutionsPvtLtd / react-native-audio-waveform

React Native component to show audio waveform with ease in react native application ✨
MIT License
141 stars 22 forks source link

[FEATURE] Better handling of current playing player or recorder #124

Open dprevost-LMI opened 4 weeks ago

dprevost-LMI commented 4 weeks ago

As shown in the image below, in the current example app, the stop action is called for all the other players when stopping one player or starting another. This does not scale when there are hundreds of them. Also, with around 40 players, we see a noticeable lag when playing one audio after another.

image

By adding the playerState and the playerKey in this PR, I could review the logic in the example app so that we could only stop the previous player from playing instead of all of them.

Finally, by adding the recorderState, I also managed to stop any player when starting a recording.