-
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
Ducking Others Audios #652
Comments
i have the same issue. i tried every possible solution but it doesnt seem to duckOthers. this is not implemented yet it seems in the package. |
I just created a new PR for this feature (only for iOS) #745 if you want to test it out and provide any feedback just do
it will replace the main branch with the new branch to test it, later you can redo
and it will replace it back. If you install the ducking branch. make sure you use the updated setCategory method which have a new parameters (3rd) named duckOthers @param category — AVAudioSession category
@param mixWithOthers — Can be set to true to force mixing with other audio sessions.
@param duckOthers — Can be set to true to duck other sounds (iOS).
Sound.setCategory("Playback", true, true) test it out and let me know if you face any issues so i can modify it :) |
Worked like a charm. Thanks a lot. |
Hi @EyadAlghamdi, I am using your repo it work for me good, but I need duck and unDuck feature for IOS and android both, Can you help me in this scenario. |
Hi @EyadAlghamdi,after ducking background sound it increases slowly slowly, and also not going to it original level of volume, and I am unable to fully unDuck the volume of background sound |
Hello all, here's a patch file that incorporates @EyadAlghamdi changes + changes for Android. I've tested and it works on my devices. |
🪲 Description
Ducking (lower the volume from) others audios in background.
🪲 What is the observed behavior?
The audio from other app (like Spotify) and from react-native-sound(RNS) are mix together, however there are at the same volume :
🪲 What is the expected behavior?
🪲 Please post your code:
💡 Does the problem have a test case?
💡 Possible solution
Maybe it would be possible that I didn't use the right mode when I called
But I tried every mode they have :
//"Default", "VoiceChat", "VideoChat", "GameChat", "VideoRecording", "Measurement", "MoviePlayback", "SpokenAudio".
Or Maybe it would be possible that it was for this function
But I also tried every mode they have :
//"Ambient", "SoloAmbient", "Playback", "Record", "PlayAndRecord", "AudioProcessing", "MultiRoute".
💡 Is there a workaround?
I tried a lot of things but I completly stuck. If anyone succeeds to duck other audios in background it would be perfect.
💡 If the bug is confirmed, would you be willing to create a pull request?
Yes
Is your issue with...
Are you using...
react-native run-android
)Which versions are you using?
Does the problem occur on...
If your problem is happening on a device, which device?
The text was updated successfully, but these errors were encountered: