E4: dimostrazione e passi delle schermate che reggono a ogni ora
Quale video sia fermo dipende dall'ora: i passi lo cercano in tutta la libreria e dicono se manca. La dimostrazione chiude la ricerca prima dell'archivio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2c0cfcccf2
commit
18d8b70638
6 files changed
+69
-33
No files matched your search
@@ -7,9 +7,16 @@ const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).
|
||||
|
||||
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
|
||||
const still = (await json(`/api/library?kind=stillvideos&accounts=${marta.id}&limit=1`)).tiles[0];
|
||||
if (!still) throw new Error('La dimostrazione non ha un video fermo di @marta.demo.');
|
||||
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${still.id}"]`);
|
||||
await until(tile);
|
||||
tile().click();
|
||||
const entry = await json(`/api/entries/${still.id}`);
|
||||
await until(() => document.querySelector('.vis video, .vis img'));
|
||||
for (let i = entry.media.findIndex((m) => m.still?.outcome === 'still'); i > 0; i--) {
|
||||
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight' }));
|
||||
await sleep(300);
|
||||
}
|
||||
await until(() => document.querySelector('.vis .azione-salva-fotogramma') && document.querySelector('.vis video')?.readyState >= 2);
|
||||
const video = document.querySelector('.vis video');
|
||||
video.pause();
|
||||
|
||||
Reference in new issue
Block a user