From 02c41776b8346f913a2fa4c88586e0eff25f8d8f Mon Sep 17 00:00:00 2001 From: KoalaDev <6156589+Shik3i@users.noreply.github.com> Date: Sat, 27 Jun 2026 06:21:27 +0200 Subject: [PATCH] fix(host-control-mode): re-query host pos when captured target is unusable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audit follow-up on the snap-back paths. The immediate involuntary snap used the captured target directly; if it was null/invalid (host position not known yet, e.g. before the first host heartbeat) hcmSnapBackToHost no-ops and the guest is left silently paused with no dialog and no retry. The deferred and "Stay in sync" paths already re-query with retry — make the immediate path fall back to the same when the captured target isn't usable. Co-Authored-By: Claude Opus 4.8 --- extension/content.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extension/content.js b/extension/content.js index 78a8b9d..733233b 100644 --- a/extension/content.js +++ b/extension/content.js @@ -261,7 +261,12 @@ // Buffering/ads/throttle — silently re-sync, no dialog spam. const video = findVideo(); if (video && video.readyState >= 3 && !video.seeking) { - hcmSnapBackToHost(target); // ready now → snap immediately + // Ready now → snap immediately. Use the captured target if it's + // usable, otherwise re-query+retry (host state may not be known yet) + // so we never leave the guest silently stuck (consistent with the + // deferred and "Stay in sync" paths). + if (target && Number.isFinite(target.targetTime)) hcmSnapBackToHost(target); + else hcmRequestHostSyncWithRetry(); } else { hcmDeferredSnapBack(); // buffering → wait for ready, then snap once (#3) }