File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
android/src/main/java/com/getcapacitor/community/audio Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,10 @@ protected void handleOnResume() {
108
108
public void configure (PluginCall call ) {
109
109
initSoundPool ();
110
110
111
- if ( call . hasOption ( OPT_FADE_MUSIC )) this .fadeMusic = call .getBoolean (OPT_FADE_MUSIC );
111
+ this .fadeMusic = call .getBoolean (OPT_FADE_MUSIC , true );
112
112
113
- if (call . hasOption ( OPT_FOCUS_AUDIO ) && this .audioManager != null ) {
114
- if (call .getBoolean (OPT_FOCUS_AUDIO )) {
113
+ if (this .audioManager != null ) {
114
+ if (call .getBoolean (OPT_FOCUS_AUDIO , true )) {
115
115
this .audioManager .requestAudioFocus (this , AudioManager .STREAM_MUSIC , AudioManager .AUDIOFOCUS_GAIN );
116
116
} else {
117
117
this .audioManager .abandonAudioFocus (this );
You can’t perform that action at this time.
0 commit comments