Cleanup joinedAudioOnly state when user disconnects or reconnect microphone #11515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11490
The confusion mentioned in #11490 is caused because when you leave audio (while in audio transfer) the state of breakout component isn't properly cleared. This means when user join audio again, the breakout menu will show the label "Return audio" (but the user didn't even join breakout audio).
This is the behavior fixed by this PR:
Additional context
The default behavior for audio is: when leaving or reconnecting audio, we recover the mute state but not the 'breakout-room-state' (the breakout-room audio that was active before the audio disconnect/reconnect). So we leave the user to return to breakout room by himself.
We could change this behavior by automatically connecting user into breakout audio transfer (after leaving or reconnecting) , but this could be reported in a new issue/enhancement.