aboutsummaryrefslogtreecommitdiffstats
path: root/tools/video-unmute-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-07 08:34:13 -0700
committerAdam Soltys <[email protected]>2026-10-07 08:34:13 -0700
commita6bae186071e7e07136a37f63864d0bf578edd16 (patch)
tree6fa8a1086f5b30093f7c9085b6afe06d8c69aa60 /tools/video-unmute-test.js
parent7067ed8024cf8d4694fe260df90897c5ebecb245 (diff)
parentdfb017c1b10cb52c24f4f0bcf745c6abea11b98f (diff)
downloadcoinosv3-a6bae186071e7e07136a37f63864d0bf578edd16.tar.gz
coinosv3-a6bae186071e7e07136a37f63864d0bf578edd16.zip
Merge branch 'worktree-agent-a4c5f0908bc7757bf'
Diffstat (limited to 'tools/video-unmute-test.js')
-rw-r--r--tools/video-unmute-test.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/video-unmute-test.js b/tools/video-unmute-test.js
index 16cb56f..fec3955 100644
--- a/tools/video-unmute-test.js
+++ b/tools/video-unmute-test.js
@@ -16,6 +16,10 @@ const server = Bun.serve({ port: 5302, fetch(req) {
// Hold autoplay until after repaint to make the race deterministic.
window.IntersectionObserver = undefined;
const t = key => key;
+ // what videoNode reaches for outside the slice: no cached stills or sizes,
+ // and no clip over the data budget
+ const videoThumbs = new Map(), videoInfo = new Map(), tappedClips = new Set();
+ const feedMedia = () => null, rememberVideo = () => {}, probeVideo = async () => {}, videoHeavy = () => false, heavyLabel = () => '';
${dom}
${video}
const url = '/clip.webm';
@@ -24,6 +28,8 @@ const server = Bun.serve({ port: 5302, fetch(req) {
const originalButton = live.querySelector('button');
const fresh = videoNode(url);
morph(live, fresh);
+ // (a clip loads nothing until it comes into view; this one is in view)
+ live.querySelector('video').preload = 'auto';
window.test = { live, fresh, originalButton, rebuild() {
const next = videoNode(url); live.replaceWith(next); return next.querySelector('video').muted;
} };