From 1cef9ebb08785925b2358a3b313c80487595f3f2 Mon Sep 17 00:00:00 2001 From: ryzendigo Date: Tue, 17 Mar 2026 16:19:42 +0800 Subject: [PATCH] fix: preserve other cameras' volume when adjusting one 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}