I'm using just audio package to play 1-second beeping sounds in my Flutter app which is aimed mainly at iOS.
The problem I'm having is that other audio (music, audiobooks, etc) is stopped whenever this beep sound gets played and it stays stopped, i.e. it doesn't resume automatically after the beep.
Is there a way to just reduce the sound of the background audio by, say 50% for that 1 second the beep is going to take and then resume the normal playback?
You can use the packages : just_audio 0.9.32 and audio_session 0.1.13
just_audio is an audio player and audio_session would be used to control the audio settings i.e when the beep sound is played and as it finished the audio_session would restore the previous audio after the beep sound finishes.
You can use the "setCategoryVolumeGain" method to reduce the volume by 50% and when the beep is played after it , it would play and the previous audio would automaticall restore after the beep.