diff options
| author | Adam Soltys <[email protected]> | 2026-10-24 15:02:39 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-24 15:02:39 -0700 |
| commit | 9270bc52a33ef007d57d15b5e6aee95248c368a2 (patch) | |
| tree | 1f51dec954fa7d976cc4d43281b57a789c59365e /tools/pager-prime-test.js | |
| parent | eec7abcfa329b6b405e69ffff54ae0a312f66860 (diff) | |
| download | coinosv3-9270bc52a33ef007d57d15b5e6aee95248c368a2.tar.gz coinosv3-9270bc52a33ef007d57d15b5e6aee95248c368a2.zip | |
Feed clips with a mouse: a big play/pause in the middle on hover that plays or pauses in place, a click on a playing clip pauses it (a paused one still opens the pager), and a tall clip is held to three quarters of a computer screen with its box narrowed to the clip's shape
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
Diffstat (limited to 'tools/pager-prime-test.js')
| -rw-r--r-- | tools/pager-prime-test.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/pager-prime-test.js b/tools/pager-prime-test.js index 7263ee1..4989790 100644 --- a/tools/pager-prime-test.js +++ b/tools/pager-prime-test.js @@ -114,6 +114,8 @@ async function run() { await page.waitForSelector('.notes-feed video.note-video', { timeout: 20000 }); const r = await page.evaluate(() => { const row = [...document.querySelectorAll('.notes-feed [data-key]')].find((n) => n.textContent.includes('clip c0 here')); row.querySelector('.note-video-box').scrollIntoView({ block: 'center' }); const v = row.querySelector('video.note-video').getBoundingClientRect(); return { x: v.x + v.width * 0.2, y: v.y + v.height * 0.3 }; }); await sleep(800); + // a mouse click on a playing clip pauses it; a paused one opens + await page.evaluate(([x, y]) => { const v = document.elementFromPoint(x, y); if (v && v.tagName === 'VIDEO') v.pause(); }, [r.x, r.y]); await page.mouse.click(r.x, r.y); check('the pager opens', await waitFor(() => !!document.querySelector('.media-pager.videos'), null, 4000)); check('the next clip\'s warm player has played a moment, unheard, and waits paused a frame or two in', await waitFor(() => { const s = [...document.querySelectorAll('.mp-slide')].find((x) => x.getAttribute('data-k').endsWith('/c1.webm')); const v = s && s.querySelector('video.mp-media'); return v && v.paused && v.currentTime >= 0.03 && v.currentTime < 0.6; }, null, 10000), JSON.stringify(await vid('c1'))); |
