From c3d41d1b4f042d09a637b375ce930190b7ea0d8c Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 17 Oct 2026 14:42:51 +0200 Subject: fix(spa): a reconnection's resume calls the landing, not a number A constant in startStream hid resumeAt, so a reconnection with read-ahead left the player waiting and the film froze at the end of its buffer. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/video-player.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/video-player.js b/packages/meshbay-hub/src/meshbay_hub/static/video-player.js index 5ea14ef1..770d2c33 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/video-player.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/video-player.js @@ -1383,9 +1383,10 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose, onDownload, onCopyL // does not know about, which is the whole window's worth of overshoot on // the very first breath of the stream. outstandingRef.current = STREAM_WINDOW; - const resumeAt = readResumePosition(entry.id); - if (resumeAt) setResumedFrom(resumeAt); - transport.requestStream(entry.id, STREAM_WINDOW, resumeAt, audioTrackRef.current); + // Not `resumeAt`: that is the landing `onStreamInit` above calls by name. + const leftAt = readResumePosition(entry.id); + if (leftAt) setResumedFrom(leftAt); + transport.requestStream(entry.id, STREAM_WINDOW, leftAt, audioTrackRef.current); }; // Closing the tab, or backgrounding it on a phone, never runs a React -- cgit v1.2.3