Skip to content

fix(android): Allow AudioFocus.none#1534

Merged
Gustl22 merged 5 commits into
mainfrom
gustl22/1495-android-context
Jun 12, 2023
Merged

fix(android): Allow AudioFocus.none#1534
Gustl22 merged 5 commits into
mainfrom
gustl22/1495-android-context

Conversation

@Gustl22

@Gustl22 Gustl22 commented May 31, 2023

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • Need to test against Android API <26, probably compatible with API 19
  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs:, chore: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in example.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Migration instructions

The AndroidAudioFocus is now by default set to gain.
To change the behavior set the AndroidAudioFocus to none:

  AudioPlayer.global.setGlobalAudioContext(
    AudioContext(
      android: AudioContextAndroid(
        audioFocus: AndroidAudioFocus.none,
      ),
    ),
  );

Related Issues

Closes #1495
Closes #1534

@Gustl22 Gustl22 marked this pull request as ready for review June 12, 2023 17:15
@Gustl22 Gustl22 requested a review from spydon June 12, 2023 17:57
@Gustl22 Gustl22 merged commit 858d3f4 into main Jun 12, 2023
@Gustl22 Gustl22 deleted the gustl22/1495-android-context branch June 12, 2023 18:44
@Gustl22 Gustl22 mentioned this pull request Jul 25, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: impossible to have non-ducking, non-interrupting playback of other audio when AudioContext is used

2 participants