-
Notifications
You must be signed in to change notification settings - Fork 749
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
Audio plays as soon as an instance is created #819
Comments
Hey, @n-ii-ma, does this example fix the issue? App.tsx
Environment
|
On iOS it does work in this way but on Android I have to call the |
I just tried calling the Getting a lot of headaches with this library, TBH. |
You can solve it using the
|
I did as you mentioned and still nothing but I just realized that I'm releasing the audio in the cleanup function of
This is for an app like Uber for the drivers which will play a sound after an order arrives via a Socket Connection. I myself am a bit confused here for even if the cleanup function gets called, after the conditions are met, the Also, as I mentioned before, this problem only occurs on Android. |
You might be over-complicating things with
Let me know if it works now! |
Yeah this does work indeed but since no cleanup is done in the One workaround I found was to just stop playing the sound inside the cleanup function yet I'm wondering if not releasing the audio might lead to memory leak issues. |
This will help https://www.youtube.com/watch?v=vVI7ZAZq5e0 |
This packages has an annoying bug which makes it totally useless and that is playing without even calling the
.play()
method.This only happens on Android. The issue is the fact that the method is being called inside of the callback of
Sound
:And if the method of
.play()
isn't called inside of it, it won't work at all.The text was updated successfully, but these errors were encountered: