We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b954af3 commit 1e8c3e7Copy full SHA for 1e8c3e7
android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java
@@ -108,10 +108,10 @@ protected void handleOnResume() {
108
public void configure(PluginCall call) {
109
initSoundPool();
110
111
- if (call.hasOption(OPT_FADE_MUSIC)) this.fadeMusic = call.getBoolean(OPT_FADE_MUSIC);
+ this.fadeMusic = call.getBoolean(OPT_FADE_MUSIC, true);
112
113
- if (call.hasOption(OPT_FOCUS_AUDIO) && this.audioManager != null) {
114
- if (call.getBoolean(OPT_FOCUS_AUDIO)) {
+ if (this.audioManager != null) {
+ if (call.getBoolean(OPT_FOCUS_AUDIO, true)) {
115
this.audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
116
} else {
117
this.audioManager.abandonAudioFocus(this);
0 commit comments