-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: ability to stop all extractors #119
base: develop
Are you sure you want to change the base?
feat: ability to stop all extractors #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dprevost-LMI Can you add these new methods in readme docs as well?
1965941
to
891a7c5
Compare
97cf9f8
to
bb8f68b
Compare
example/src/assets/icons/play.png
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change cannot be seen since I used a tool to change the space colour from Gray
to RBG,
this. fixed the tintColor
problem on iOS
Waiting on #123 merge to fix the player button s issue when clicking stop all |
708eeb3
to
1f3a0bf
Compare
Now waiting on #136 since some promise rejections are missing to thoroughly test the player after stopping everything! |
chore: wrong AudioWaveform import in App.tsx + delete recording button fix: wrong path chore: log error only when not stop by everything fix: missing promise.resolve chore: review `handleStopEverything` and `handleDeleteRecordings` fix: promises resolve too soon because of the stop everything changes fix: all error pass to onError should be an Error instance, not a string fix: move stopEverything in JS + clear all arrays for less leak chore: stop recorder also + remove logPromise chore: remove unneeded changes chore: expose `stopAllWaveFormExtractors` fix: better white delete icon chore: remove delete recodings fix: review array item handling since we clear the arrays chore: fix doc feat: make stopAllWaveFormExtractors work in iOS + remove stopRecording fix: remove everything from the player array to not increase forever chore: small renaming
1f3a0bf
to
908217e
Compare
Rebased and retested on Android and iOS Screen.Recording.2024-11-19.at.6.50.32.AM.mov |
@kuldip-simform, when you have a minute, this PR is ready to be approved & merged! |
Hey, I'm just checking if there are still some chances to merge this one; otherwise, I will just close it! |
In a scenario where we want to use the audio player to load several audio messages for different conversations and where navigation between conversations is required only to show one conversation at a time, we need an efficient way to load the audio message but also to cancel nearly everything if we switch to another conversation.
In the above scenario, when navigating away from all those audio players being played or having their waveform extracted, we need to stop them. Otherwise, opening more and more conversations in a short period will bust resources (promises, players, extractors).
This PR provides a new
stopAllWaveFormExtractors
, which, when called, stops all waveform extraction to free resources for the following conversation that will be loaded. Combined withstopAllPlayers
, the newstopPlayersAndExtractors
in theuseAudioPlayer
hook provides a way to stop everything around the audio players to ensure that no more resources are spent on the unmount screen.The new
Stop all players and extractos
option:Other:
CountDownLatch
was removed since it was not used anywhere.tintColor
issue not to work