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

fix: stop only the current player and not all players #123

Conversation

dprevost-LMI
Copy link
Contributor

@dprevost-LMI dprevost-LMI commented Oct 20, 2024

Currently, the logic of starting or stopping a player or an audio recording triggers the stop action on all the players, which is useless, and when doing so with around 40 players, we see a noticeable lag when playing one audio after another.

By adding the playerState and the playerKey, 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.

Testing Proof of the changes

Screen.Recording.2024-11-09.at.10.46.08.AM.mov

@dprevost-LMI
Copy link
Contributor Author

dprevost-LMI commented Nov 9, 2024

FYI: This PR will unblock fixes required in this one

@kuldip-simform
Copy link
Contributor

@dprevost-LMI We have added new features to the example app; can you please rebase and update your implementation to take that into account?

src/components/Waveform/Waveform.tsx Outdated Show resolved Hide resolved
src/components/Waveform/WaveformTypes.ts Outdated Show resolved Hide resolved
@dprevost-LMI dprevost-LMI force-pushed the stop-only-the-playing-player branch from caeb622 to 686e71f Compare November 15, 2024 00:35
@kuldip-simform
Copy link
Contributor

Thank you for quick update.
Just one minor comment I am adding.
As we have added pause and resume feature in example app as well then we need to take that into account as well.

example/src/App.tsx Show resolved Hide resolved
@dprevost-LMI
Copy link
Contributor Author

@mukesh-simform another PR to merge and unblock also #119, 🙇

@mukesh-simform mukesh-simform merged commit c1ed072 into SimformSolutionsPvtLtd:develop Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Better handling of current playing player or recorder
3 participants