From aec2952e15faa1f9ffddd21cb1111f48e98d328b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 14 Sep 2026 14:35:38 -0700 Subject: A video keeps playing while the page repaints. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The page repaints in the background all the time — a zap count, a profile landing, the thirty-second sync — and every repaint rebuilt a post's YouTube box as poster-plus-play-button and patched the live box into that shape, which threw the playing iframe out a few seconds into every video. Once playing, the box is the viewer's: it is frozen against the morph and left exactly as it stands. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01QYJfZ4A1TDCEY4Foq3CApR --- src/features/messages.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/features/messages.js b/src/features/messages.js index 11f1a42..9a5d185 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -3049,6 +3049,13 @@ export function messagesFeature(ctx) { const box = e.currentTarget.parentElement; if (!box || box.dataset.playing) return; box.dataset.playing = '1'; + // The page repaints in the background all the time (a zap count, + // a profile landing, the thirty-second sync), and every repaint + // rebuilds this box as poster + play button and patches the live + // one into that shape — which threw the playing iframe out a few + // seconds into every video. Once playing, the box is the viewer's + // and the morph leaves it exactly as it stands. + box._skipMorph = true; box.textContent = ''; const f = document.createElement('iframe'); f.src = src; -- cgit v1.2.3