-
Notifications
You must be signed in to change notification settings - Fork 46
fix(llc): fixed the moment to apply Andriod audio configuration #1052
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
Conversation
WalkthroughMoves Android audio configuration to occur before enabling the microphone in setMicrophoneEnabled on Android, removes the post-enable configuration path, and retains error handling and logging. No public API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor App
participant Call as Call.setMicrophoneEnabled(...)
participant AndroidCfg as AndroidAudioConfig (if Android)
participant Session as _session
App->>Call: enable microphone (true)
alt Android & enabling
Call->>AndroidCfg: apply(_streamVideo.options.androidAudioConfiguration)
note right of AndroidCfg: Pre-enable configuration
end
Call->>Session: setMicrophoneEnabled(true)
Session-->>Call: result
Call-->>App: completion / error
rect rgb(245,248,255)
note over Call,Session: Post-enable Android config path removed
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
packages/stream_video/lib/src/call/call.dart (2)
2631-2645: Log stacktrace and add a verbose log around Android audio configMinor ergonomics:
- Emit a verbose log before applying the Android audio config to aid field diagnostics.
- Capture and log the stacktrace in the catch block to speed up root-causing device-specific failures.
Apply this diff within this block:
- if (enabled && CurrentPlatform.isAndroid) { - try { + if (enabled && CurrentPlatform.isAndroid) { + try { + _logger.v( + () => '[setMicrophoneEnabled] Applying Android audio configuration', + ); if (_streamVideo.options.androidAudioConfiguration != null) { await rtc.Helper.setAndroidAudioConfiguration( _streamVideo.options.androidAudioConfiguration!, ); } - } catch (e) { - _logger.w( - () => - '[setMicrophoneEnabled] Failed to set Android audio configuration: $e', - ); + } catch (e, stk) { + _logger.w( + () => + '[setMicrophoneEnabled] Failed to set Android audio configuration: $e\n$stk', + ); } }
2627-2629: Fix permission error message (“audio” vs “video”)This path checks for
sendAudiobut returns an error saying “send video”. Please correct the message.- return Result.error('Missing permission to send video'); + return Result.error('Missing permission to send audio');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/stream_video/lib/src/call/call.dart(1 hunks)
🔇 Additional comments (1)
packages/stream_video/lib/src/call/call.dart (1)
2631-2645: Applying Android audio config before enabling mic is the right sequencingThis change aligns the configuration order correctly on Android (configure first, then enable the mic). Good defensive try/catch with non-fatal logging.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1052 +/- ##
=====================================
Coverage 4.83% 4.83%
=====================================
Files 577 577
Lines 38830 38830
=====================================
Hits 1877 1877
Misses 36953 36953 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit