Ionic mute/unmute app audio


#1

Hi, we’r stuck into an issue on Ionic iOS app. We’r using WebAudioApi to play different clips. It’s working all the way fine on both platforms Android && iOS. But on iOS if audio clips are playing and if user receive a call, app audio set to mute and when app resume again it doesn’t unmute the app audio.
I searched for mute/unmute app audio plugin but couldn’t get anything.
Any suggestions?


#2

use fm.radiant.cordova.utils.volume plugin


#3

@baviskarmitesh the plugin you mentioned is specific for Android only. And we’r facing the issue for iOS. Let me know if you know some other option or solution.
Thanks


#4

try to use cordova-plugin-media and then inside your controller function where you needs to mute the sound

medias = $cordovaMedia.newMedia();
media.setVolume(0);

should solve your problem.