From 2ace8d36702a355791a5963bb7856bf542a3d26f Mon Sep 17 00:00:00 2001 From: ryzendigo <48058157+ryzendigo@users.noreply.github.com> Date: Wed, 18 Mar 2026 22:40:37 +0800 Subject: [PATCH] fix: preserve other cameras' volume when adjusting one (#22508) setVolumeStates was replacing the entire state object instead of merging, so changing one camera's volume reset all others to default. Uses the functional update pattern to preserve existing state, matching how toggleAudio already works. --- web/src/views/live/LiveDashboardView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/views/live/LiveDashboardView.tsx b/web/src/views/live/LiveDashboardView.tsx index a25741f63..716ffed04 100644 --- a/web/src/views/live/LiveDashboardView.tsx +++ b/web/src/views/live/LiveDashboardView.tsx @@ -570,9 +570,10 @@ export default function LiveDashboardView({ toggleStats={() => toggleStats(camera.name)} volumeState={volumeStates[camera.name] ?? 1} setVolumeState={(value) => - setVolumeStates({ + setVolumeStates((prev) => ({ + ...prev, [camera.name]: value, - }) + })) } muteAll={muteAll} unmuteAll={unmuteAll}