-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: trigger a renegotiation when a call is put on hold #37383
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: trigger a renegotiation when a call is put on hold #37383
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughTwo private helper methods are added to the Changes
Sequence DiagramsequenceDiagram
participant Caller as Call Handler
participant Processor as MediaCallWebRTCProcessor
participant Transceivers as RTCRtpTransceivers
Caller->>Processor: setHeld(true/false)
activate Processor
Processor->>Processor: updateAudioDirectionWithoutNegotiation()
activate Processor
Processor->>Processor: getAudioTransceivers()
Processor->>Transceivers: Iterate audio transceivers
alt Direction mismatch detected
Processor->>Transceivers: Update transceiver direction
Note over Transceivers: sendonly (held) or sendrecv (unheld)
Processor->>Processor: Log direction change
end
deactivate Processor
Processor->>Processor: negotiationNeeded event fired
deactivate Processor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/media-signaling/src/lib/services/webrtc/Processor.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: pierre-lehnen-rc
Repo: RocketChat/Rocket.Chat PR: 36718
File: packages/media-signaling/src/lib/Call.ts:633-642
Timestamp: 2025-09-23T00:27:05.438Z
Learning: In PR #36718, pierre-lehnen-rc prefers to maintain consistency with the old architecture patterns for DTMF handling rather than implementing immediate validation improvements, deferring enhancements to future work.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (2)
packages/media-signaling/src/lib/services/webrtc/Processor.ts (2)
151-152: Good placement of the direction update call.The call to
updateAudioDirectionWithoutNegotiation()is appropriately placed after the held state and stream enable/disable updates, ensuring the transceiver direction reflects the new hold state.
328-332: LGTM! Clean helper method.The
getAudioTransceivers()helper correctly filters transceivers to audio-only, matching the pattern used elsewhere in this file (lines 109-111, 187-189).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/voip-sync-audio-direction #37383 +/- ##
===============================================================
Coverage 68.06% 68.06%
===============================================================
Files 3364 3364
Lines 115626 115626
Branches 20869 20798 -71
===============================================================
+ Hits 78699 78701 +2
+ Misses 34250 34245 -5
- Partials 2677 2680 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…igger-renegotiation
…igger-renegotiation
a752008
into
feat/voip-sync-audio-direction
Proposed changes (including videos or screenshots)
Issue(s)
VGA-40
Steps to test or reproduce
Further comments
Summary by CodeRabbit