aboutsummaryrefslogtreecommitdiffstats
path: root/tools/feed-media-views-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-07 16:33:09 -0700
committerAdam Soltys <[email protected]>2026-10-07 16:33:09 -0700
commit6dfb59316865093eda01307ee3c95f87511cdf56 (patch)
treebfe60d7eebe74eb00324b92af690942fa061038a /tools/feed-media-views-test.js
parent738bace91bcd17c0ab8ba920fe2f0765f6504fc8 (diff)
downloadcoinosv3-6dfb59316865093eda01307ee3c95f87511cdf56.tar.gz
coinosv3-6dfb59316865093eda01307ee3c95f87511cdf56.zip
Feed videos before they play: the picture fills the box with only the play button and size (no seek bar or sound button until playing); hovering the cover no longer paints it over with the app's button grey; upright phone clips (stored sideways with a quarter-turn matrix) paint upright, v1 size caches dropped; a clip the probe found HEVC switches to the copy before fetching the original
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'tools/feed-media-views-test.js')
-rw-r--r--tools/feed-media-views-test.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/feed-media-views-test.js b/tools/feed-media-views-test.js
index 4890981..2f9d627 100644
--- a/tools/feed-media-views-test.js
+++ b/tools/feed-media-views-test.js
@@ -162,7 +162,7 @@ try {
check('it waits under a cover with its size', await waitFor(() => [...document.querySelectorAll('.note-video-box .vid-heavy')].some((b) => /50 MB/.test(b.textContent)), 8000));
check('feed clips fetch nothing until they play', await page.evaluate(() => [...document.querySelectorAll('.note-video-box video')].every((v) => v.preload === 'none' || !v.paused)));
console.log('\n[Videos: flip through]');
- const info = () => page.evaluate(() => Object.fromEntries(JSON.parse((window.coinosCache || localStorage).getItem('coinos-video-info') || '[]').map(([u, d]) => [u.split('/').pop(), d])));
+ const info = () => page.evaluate(() => Object.fromEntries(JSON.parse((window.coinosCache || localStorage).getItem('coinos-video-info-v2') || '[]').map(([u, d]) => [u.split('/').pop(), d])));
const srcs = () => page.evaluate(() => [...document.querySelectorAll('.media-pager video')].map((v) => ({ src: !!v.getAttribute('src'), pre: v.preload })));
await mode('videos');
check('Videos shows a grid of the vertical clips, not the pager yet', await waitFor(() => document.querySelectorAll('.media-grid .media-tile.video').length === 3, 8000)
@@ -181,7 +181,7 @@ try {
let ss = await srcs();
check('only the clip on screen loads in full; the next gets its opening; the rest nothing',
ss[0].src && ss[0].pre === 'auto' && ss[1].src && ss[1].pre === 'metadata' && !ss[2].src, JSON.stringify(ss));
- await waitFor(() => Object.keys(JSON.parse((window.coinosCache || localStorage).getItem('coinos-video-info') || '[]')).length >= 3, 6000);
+ await waitFor(() => Object.keys(JSON.parse((window.coinosCache || localStorage).getItem('coinos-video-info-v2') || '[]')).length >= 3, 6000);
await sleep(1500);
const vi = await info();
check('a probe reads the size, ranges, layout and picture size from 64 KB', vi['a.mp4']?.probed && vi['a.mp4'].ranges && vi['a.mp4'].faststart