From e0b9e9ef27851d35122b61b0214ab18e86894302 Mon Sep 17 00:00:00 2001 From: Timo <6156589+Shik3i@users.noreply.github.com> Date: Mon, 18 May 2026 20:10:29 +0200 Subject: [PATCH] perf(background): reduce reactive update lock duration to 1.0s --- extension/background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/background.js b/extension/background.js index 40565a2..384f97b 100644 --- a/extension/background.js +++ b/extension/background.js @@ -634,9 +634,9 @@ function handleServerEvent(event, data) { peer.muted = data.muted !== undefined ? data.muted : peer.muted; // Race condition guard: ignore heartbeat playbackState/currentTime - // if we applied a reactive user action in the last 1.5 seconds. + // if we applied a reactive user action in the last 1.0 second. const timeSinceReactive = peer.lastReactiveUpdate ? (Date.now() - peer.lastReactiveUpdate) : Infinity; - const ignoreStatus = timeSinceReactive < 1500; + const ignoreStatus = timeSinceReactive < 1000; if (!ignoreStatus) { peer.playbackState = data.playbackState !== undefined ? data.playbackState : peer.playbackState;