aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-14 14:35:38 -0700
committerAdam Soltys <[email protected]>2026-09-14 14:35:38 -0700
commitaec2952e15faa1f9ffddd21cb1111f48e98d328b (patch)
tree439721b46ddda97ae5a9af270ca58ac96bb5de22
parentb2d12093a935683e69af3e92d620326dcf7a2710 (diff)
downloadcoinosv3-aec2952e15faa1f9ffddd21cb1111f48e98d328b.tar.gz
coinosv3-aec2952e15faa1f9ffddd21cb1111f48e98d328b.zip
A video keeps playing while the page repaints.
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01QYJfZ4A1TDCEY4Foq3CApR
-rw-r--r--src/features/messages.js7
1 files changed, 7 insertions, 0 deletions
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;