To fix the issue you can do I figured out a way. I declared an AVAudioPlayer in the AppDelegate to play a background soundtrack, and I used a silent track. Since the iPad responds to AVAudioPlayers, the other sounds (System Sounds, that I use for sound effects) automatically respond too. I suppose it's not the best solution, but it worked for me.
PhoneGap/Cordova on iOS: Get exact device hardware version (e.g. iPad 1 or iPad 2)
may help you . By default the hardware buttons will change the alarm volume unless you have an open audio session when they use the buttons. I would recommend opening an AVAudioSession to have them change it or placing a volume slider somewhere in your app to have them change the volume. This is a difficult problem to solve perfectly because users aren't told what is wrong and many times don't look to see that the ringer volume is what is being changed.
Android - Control SoundPool's volume with hardware volume buttons?
Detect hardware volume button press when volume not changed
By : user3581093
Date : March 29 2020, 07:55 AM
hope this fix your issue I need to detect the sound volume button click. Solution in Detect volume button press and used by me work only when sounds volume changed. I need to detect sound volume button click. For example when the sound has max level and the user clicks up level button this solution was not work.