fix(audio): always send unhold

Alway send the unhold command since it doesn't change flip the state
(contrary to the uuid_hold toggle command).

It's not idempotent, though - so always update the internal hold state
to prevent state mismatches preventing channels from being unheld.
This commit is contained in:
prlanzarin 2024-06-27 21:22:32 -03:00
parent 631d5186e5
commit 1c57db94bb

View File

@ -25,14 +25,15 @@ trait ListenOnlyModeToggledInSfuEvtMsgHdlr {
// opposite of what we want.
// The unhold (uuid_hold off) command is not affected by this, but we don't
// want to send it if the channel is already unheld.
if (msg.body.enabled != vu.hold) {
if ((msg.body.enabled && !vu.hold) || !msg.body.enabled) {
VoiceApp.holdChannelInVoiceConf(
liveMeeting,
outGW,
vu.uuid,
msg.body.enabled
)
} else {
}
// If the channel is already in the desired state, just make sure
// any pending mute or unmute commands are sent.
VoiceApp.handleChannelHoldChanged(
@ -44,5 +45,4 @@ trait ListenOnlyModeToggledInSfuEvtMsgHdlr {
)
}
}
}
}