-
Notifications
You must be signed in to change notification settings - Fork 751
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
How do I implement ducking on both Android and iOS? #512
Comments
Seems like the module is ducking audio on iOS, but not on Android. How can I fix this? |
iOS is ducking the audio, but the ducking is not released. All other audio volume is lowered permanently. |
Hey there. How did you implement ducking? I would expect below to work but it's not. Default settings do not duck the sound in IOS. Can you share your settings please? Sound.setCategory('Playback', true);
Sound.setMode('SpokenAudio'); |
Hi, Do you find a way to get around and allow duck? |
Hi. I ended up implementing my own solution using NativeModules. Did not use any 3rd party libs just built-in Apple and Android audio libraries. It's relatively easy with NativeModules if you have some experience in Java and Swift. And you get a strong API with good documentation. Sorry, probably not the answer you're looking for. |
Thanks for answering, it still help me |
Hey sorry I don't have access to that codebase anymore but I have used below option: |
I added a new PR to implement ducking (only for iOS so far). you can replace react-native-sound branches in your repo back and forth between this main one and the one i made. just make sure to rebuild your ios simulator or device! |
How can I duck other audio while the audio file is playing? I found the set/getSystemAudio function in the API wiki page, but those seem to be only for Android. I decided to try those out on my Android device but calling them would crash the application.
Is there a way to duck the audio through react-native-sound or any other method?
The text was updated successfully, but these errors were encountered: