diff options
| author | Adam Soltys <[email protected]> | 2026-10-22 15:12:04 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-22 15:12:04 -0700 |
| commit | 8257a98e8d1891d0795f6b8b0623678245cc8e33 (patch) | |
| tree | 00f6f3ca948785e31dd4544733846b0cdc710118 /tools/feed-media-cache-test.js | |
| parent | 520919208e63a08e4eab3102e1986532dddfaf92 (diff) | |
| download | coinosv3-8257a98e8d1891d0795f6b8b0623678245cc8e33.tar.gz coinosv3-8257a98e8d1891d0795f6b8b0623678245cc8e33.zip | |
Media grids: one tile for a clip uploaded twice, and a picture that won't load stays out
- Videos: one person's clips of one size to the byte are one clip. Beatbox
Serenade posted the same video as a note and as a video event, each
upload a fresh Blossom hash, so neither the file nor the words matched.
Only a size the post or the host states counts (a bitrate x duration
guess is marked sizeGuess and never matched).
- Images: a picture whose load failed was hidden by a class the next
repaint rewrote, so the broken-picture glyph came back (a deleted
nostr.media file in #artstr). Failed pictures are now remembered for the
session and left out of the grid.
- A tile fetching its own frame froze the whole tile against repaints, so
one built for the one-to-a-row layout never got its --ar in justified rows
(zero width). Only the player and its stand-ins are frozen now; the
render draws the cost badge itself. Tile pictures no longer size their
tile (a frame-grab <video>'s 320px stretched its row).
- Test fixtures that served one file under several names (or one imeta
size for every clip) now differ per clip.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K5xtiFrkFVsrkWx6JDQjiT
Diffstat (limited to 'tools/feed-media-cache-test.js')
| -rw-r--r-- | tools/feed-media-cache-test.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/feed-media-cache-test.js b/tools/feed-media-cache-test.js index eee88c5..5a26ca2 100644 --- a/tools/feed-media-cache-test.js +++ b/tools/feed-media-cache-test.js @@ -14,7 +14,9 @@ let ok = true; const check = (n, c, d = '') => { console.log(` ${c ? '✓' : '✗'} ${n}${d ? ' — ' + d : ''}`); if (!c) ok = false; }; const dir = mkdtempSync(tmpdir() + '/mcache-'); const ff = (args) => { const p = Bun.spawnSync(['ffmpeg', '-y', '-loglevel', 'error', ...args]); if (p.exitCode !== 0) throw new Error('ffmpeg failed'); }; -for (const n of ['v1', 'v2', 'v3', 'h4', 'n5', 'r6']) ff(['-f', 'lavfi', '-i', 'testsrc=size=360x640:rate=10', '-t', '2', '-c:v', 'libx264', '-pix_fmt', 'yuv420p', '-movflags', '+faststart', `${dir}/${n}.mp4`]); +// (six different files: one person's clips of one size to the byte are taken +// for one clip uploaded twice) +for (const [i, n] of ['v1', 'v2', 'v3', 'h4', 'n5', 'r6'].entries()) ff(['-f', 'lavfi', '-i', 'testsrc=size=360x640:rate=10', '-t', String(2 + i / 4), '-c:v', 'libx264', '-pix_fmt', 'yuv420p', '-movflags', '+faststart', `${dir}/${n}.mp4`]); ff(['-f', 'lavfi', '-i', 'testsrc=size=800x600', '-frames:v', '1', `${dir}/slow.jpg`]); const html = await buildHtml({ minify: true, pwa: false }); |
