Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Extend AudioContextConfig.duckAudio to AudioContextConfig.focus #1720

Merged
merged 5 commits into from
Dec 4, 2023

Conversation

Gustl22
Copy link
Collaborator

@Gustl22 Gustl22 commented Dec 1, 2023

Description

  • Introduces AudioContextConfigFocus.mixWithOthers to unify AVAudioSessionOptions.mixWithOthers (iOS) and AndroidAudioFocus.none (Android)
  • Replaces the option AudioContextConfig.duckAudio = true with AudioContextConfig.focus = AudioContextConfigFocus.duckOthers

Closes #1718

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, refactor:,
    docs:, chore:, test:, ci: 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

Before:

AudioContextConfig(
  duckAudio: true,
);

After:

AudioContextConfig(
  focus: AudioContextConfigFocus.duckOthers,
);

Related Issues

Closes #1718

@Gustl22 Gustl22 requested a review from spydon December 1, 2023 02:01
Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@Gustl22 Gustl22 merged commit 87f3cb7 into main Dec 4, 2023
7 checks passed
@Gustl22 Gustl22 deleted the gustl22/1718-mix-with-others branch December 4, 2023 18:59
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.

Add mixWithOthers to AudioContextConfig
2 participants