Skip to content

Conversation

@anna1901
Copy link
Contributor

Description

Apply default audio filters that can be overwritten by the user.

Documentation impact

  • Documentation update required
  • Documentation updated in another PR
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

@linear
Copy link

linear bot commented Jan 22, 2026

@anna1901 anna1901 requested a review from Copilot January 22, 2026 13:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements default audio filters for mobile clients by introducing Google-specific audio processing constraints. These defaults can be overridden by users through custom audio constraints.

Changes:

  • Added new constraints.ts module with default mobile audio constraints and merge logic
  • Modified FishjamProvider to automatically apply default audio constraints
  • Exported DEFAULT_MOBILE_AUDIO_CONSTRAINTS for user reference

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/mobile-client/src/constraints.ts New file defining default Google audio processing constraints and merge function
packages/mobile-client/src/index.ts Updated to import and apply default audio constraints in FishjamProvider

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 96 to 101
const mergedConstraints = React.useMemo(() => {
return {
...props.constraints,
audio: mergeMobileAudioConstraints(props.constraints?.audio),
};
}, [props.constraints]);
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

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

The useMemo dependency array uses the entire props.constraints object. Since objects are compared by reference, this will cause the memo to recalculate on every render even if the constraints haven't actually changed. Consider using a more granular dependency or accepting that this is intentional behavior.

Copilot uses AI. Check for mistakes.
anna1901 and others added 4 commits January 22, 2026 17:12
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