feat(ui): in-call echo-cancellation toggle, synced with Settings
Add an "Echo cancellation" checkbox to the in-call control column (beside Push-to-Talk). It binds to the same config.echo_cancellation_enabled flag and ToggleEchoCancellation message as the Settings checkbox, so the two stay in sync automatically (single source of truth; iced re-renders from it). A tooltip is explicit that it applies on the NEXT room join — the current PipeWire-module AEC is wired at join time and isn't hot-swappable mid-call. (A true live in-call toggle falls out for free once the in-process EchoCanceller lands — AEC Stage E.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1775,6 +1775,27 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
||||
column![]
|
||||
},
|
||||
vertical_space(20.0),
|
||||
// Echo cancellation — same flag + message as the Settings checkbox, so
|
||||
// toggling here and there stay in sync automatically (single source of
|
||||
// truth: config.echo_cancellation_enabled). Tooltip is explicit that it
|
||||
// applies on the NEXT join (the PipeWire-module AEC is wired at join
|
||||
// time, not hot-swappable mid-call).
|
||||
tooltip(
|
||||
checkbox(state.config.echo_cancellation_enabled)
|
||||
.label("Echo cancellation")
|
||||
.on_toggle(AppMessage::ToggleEchoCancellation),
|
||||
container(
|
||||
text("Cancels speaker echo + suppresses noise. Applies on your next room join.")
|
||||
.size(11)
|
||||
.color(color_text),
|
||||
)
|
||||
.padding(8)
|
||||
.max_width(260.0)
|
||||
.style(c_style(color_crust, color_surface, 6.0)),
|
||||
iced::widget::tooltip::Position::Top,
|
||||
)
|
||||
.gap(8),
|
||||
vertical_space(20.0),
|
||||
{
|
||||
let (rec_kind, rec_label, rec_bg, rec_hover, rec_fg) = if state.recording {
|
||||
(IconKind::Stop, "Stop Recording", color_red, color_maroon, color_crust)
|
||||
|
||||
Reference in New Issue
Block a user