fix(audio): broken mute toggle when using LiveKit#24229
fix(audio): broken mute toggle when using LiveKit#24229prlanzarin merged 1 commit intobigbluebutton:v3.0.x-releasefrom
Conversation
A recent change altered AudioManager's audio state observer to call mute/unmute state on every audio state update - regardless of whether the local mute state actually changes. Since the mute/unmute actions of the LiveKit audio bridge are not fully idempotent yet, this may cause audio tracks to be published and unpublished in sequence, mistakengly, due to trailing (un)mute calls sent in a short timespan. This breaks the mute toggle when using LiveKit - i.e.: unresponsive or flipping mute states incorrectly. Guarantee that AudioManager's audio state observer only triggers mute/unmute when its muted state actually changes. This fixes the "catalyst" for the above problem. The LK audio bridge should still have an idempotent mute/unmute API (setSenderTrackEnabled) - this issue wouldn't have happened if that was the case. That will be addressed in subsequent commits.
WalkthroughThe Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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). (1)
🔇 Additional comments (1)
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 |
|
Automated tests Summary✅ All the CI tests have passed! |



What does this PR do?
mute/unmute state on every audio state update - regardless of whether
the local mute state actually changes. Since the mute/unmute actions of
the LiveKit audio bridge are not fully idempotent yet, this may cause
audio tracks to be published and unpublished in sequence, mistakengly,
due to trailing (un)mute calls sent in a short timespan.
This breaks the mute toggle when using LiveKit - i.e.: unresponsive or
flipping mute states incorrectly.
mute/unmute when its muted state actually changes. This fixes the
"catalyst" for the above problem.
(setSenderTrackEnabled) - this issue wouldn't have happened if that was
the case. That will be addressed in subsequent commits.
Closes Issue(s)
None