Skip to content

Conversation

@Brazol
Copy link
Contributor

@Brazol Brazol commented Sep 30, 2025

This PR fixes and issue where custom Android audio configuration could not be applied correctly for participants joining the call.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where Android audio configuration wasn't reliably applied for participants joining calls. Audio settings are now applied at call start, improving routing and behavior on Android devices. If applying the configuration fails, the call proceeds without interruption and a warning is logged.
  • Chores
    • Updated changelog with the upcoming fix.

@Brazol Brazol requested a review from a team as a code owner September 30, 2025 11:36
@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2025

Walkthrough

Apply Android-specific WebRTC audio configuration during CallSession.start(): after rtcManager initialization, call rtc.Helper.setAndroidAudioConfiguration when androidAudioConfiguration is provided; failures are caught and logged without aborting startup. Also update CHANGELOG with the fix note.

Changes

Cohort / File(s) Summary
Changelog update
packages/stream_video/CHANGELOG.md
Added Upcoming entry noting fix: Android audio configuration could not be applied correctly for participants joining calls.
Call start Android audio config
packages/stream_video/lib/src/call/session/call_session.dart
In start(), after rtcManager creation, if running on Android and androidAudioConfiguration is provided, call rtc.Helper.setAndroidAudioConfiguration(config) inside a try-catch; log a warning on failure and continue start.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant CallSession
    participant RTCManager
    participant RTC_Helper as rtc.Helper
    participant Logger

    App->>CallSession: start()
    CallSession->>RTCManager: create/init
    alt Android AND androidAudioConfiguration != null
        CallSession->>RTC_Helper: setAndroidAudioConfiguration(config)
        Note over CallSession,RTC_Helper: Apply before proceeding with rest of start
        opt Failure
            RTC_Helper-->>CallSession: throws
            CallSession->>Logger: warn("Failed to apply Android audio config")
            Note over CallSession: Continue without aborting
        end
    end
    CallSession-->>App: start() continues
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • renefloor
  • xsahil03x

Poem

A hop and a tap in the audio glade,
I nudged the config where echoes are made.
Android ears now tune the tone—
If setup slips, we log and carry on.
Carrots hummed; bugs stay away. 🥕🎧

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description only provides a single-sentence summary and does not follow the repository’s required template, missing critical sections such as the Goal, Implementation details, Testing instructions, and the Contributor Checklist. This omission makes it difficult for reviewers to understand the change rationale and testing approach. Please update the PR description to follow the repository’s standard template by adding sections for the Goal, Implementation details, UI changes (if any), Testing steps, and the Contributor Checklist, and include any relevant details such as code snippets, screenshots, or links to related issues.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title clearly identifies the primary change—correcting the Android audio configuration setup—and follows a concise conventional-commit style, making it immediately understandable to reviewers scanning the history.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fix-android-audio-configuration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 4.84%. Comparing base (bcaeecb) to head (010a66c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...tream_video/lib/src/call/session/call_session.dart 0.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1070      +/-   ##
========================================
- Coverage   4.85%   4.84%   -0.01%     
========================================
  Files        591     591              
  Lines      40162   40168       +6     
========================================
  Hits        1948    1948              
- Misses     38214   38220       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Brazol Brazol changed the title fix: fix android audio configuration setup fix(llc): fix android audio configuration setup Sep 30, 2025
@Brazol Brazol merged commit b540949 into main Sep 30, 2025
12 of 17 checks passed
@Brazol Brazol deleted the fix/fix-android-audio-configuration branch September 30, 2025 12:19
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.

3 participants