aboutsummaryrefslogtreecommitdiffstats
path: root/tools/video-tile-poster-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-22 15:12:04 -0700
committerAdam Soltys <[email protected]>2026-10-22 15:12:04 -0700
commit8257a98e8d1891d0795f6b8b0623678245cc8e33 (patch)
tree00f6f3ca948785e31dd4544733846b0cdc710118 /tools/video-tile-poster-test.js
parent520919208e63a08e4eab3102e1986532dddfaf92 (diff)
downloadcoinosv3-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/video-tile-poster-test.js')
-rw-r--r--tools/video-tile-poster-test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/video-tile-poster-test.js b/tools/video-tile-poster-test.js
index 1f2cb47..48385fe 100644
--- a/tools/video-tile-poster-test.js
+++ b/tools/video-tile-poster-test.js
@@ -20,8 +20,10 @@ const CLIPBYTES = Buffer.from(await Bun.file(MP4).arrayBuffer());
const AUTHOR = (() => { const sk = generateSecretKey(); return { sk, pk: getPublicKey(sk) }; })();
const now = Math.floor(Date.now() / 1000);
const CLIP = (n) => 'https://media.test/' + n + '.mp4';
+// (each its own size: one person's clips of one size to the byte are taken
+// for one clip uploaded twice)
const post = (n, ago) => finalizeEvent({ kind: 1, created_at: now - ago, content: 'clip ' + n + ' ' + CLIP(n),
- tags: [['imeta', 'url ' + CLIP(n), 'm video/mp4', 'size 900000', 'dim 360x640']] }, AUTHOR.sk);
+ tags: [['imeta', 'url ' + CLIP(n), 'm video/mp4', 'size ' + (900000 + ago), 'dim 360x640']] }, AUTHOR.sk);
const POSTS = [post('a', 100), post('b', 200), post('nopic', 300), post('dead', 400)];
const html = await buildHtml({ minify: true, pwa: false });