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

chore(example): Improved handling of platform context #1871

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Gustl22
Copy link
Collaborator

@Gustl22 Gustl22 commented Jan 26, 2025

Description

  • Only show audioContext option, if supported by the platform
  • Automatically apply changes on select

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.

Related Issues

Base automatically changed from august/fix-audio-focus-events to main January 26, 2025 13:35
@Gustl22 Gustl22 force-pushed the august/improve-example branch from 184a924 to 3bd472d Compare January 26, 2025 13:38
@Gustl22 Gustl22 requested a review from spydon January 26, 2025 13:39
Comment on lines +34 to +35
bool isLocal = true;
bool isGlobal = false;
Copy link
Member

Choose a reason for hiding this comment

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

Aren't only one of these needed? They have an xor relationship right, it can't be both local and global at the same time?

Copy link
Collaborator Author

@Gustl22 Gustl22 Jan 27, 2025

Choose a reason for hiding this comment

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

Good point actually. I had a look again, and both are acting a little bit differently:

  • On iOS, local and global contexts act the same (until now) as no player specific contexts were necessary
  • On Android, the global option only sets the default values for new players or can set isSpeakerphoneOn or audioMode . Also of course they can be applied to one player only.
    So the options will only be applied to one player (local), as default in "global" context, or both.
    So it should be possible to select global and local simultaneously (not the one or the other).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cc @spydon

Copy link
Member

Choose a reason for hiding this comment

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

Alright!

@Gustl22 Gustl22 merged commit ddfe93d into main Jan 28, 2025
18 checks passed
@Gustl22 Gustl22 deleted the august/improve-example branch January 28, 2025 21:33
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.

2 participants