Add presenter view, stats, lyrics worker, watch party with voice chat, timestamp sharing, soundbites, notes, transcript search, PiP, EQ, sleep fade, gestures and external players; fix the crossfade end-of-song race

This commit is contained in:
Jonathan Sykes
2026-09-20 00:07:12 +08:00
parent ca07e1fdf1
commit 9c1ec4ac51
17 changed files with 2912 additions and 111 deletions

View File

@@ -56,6 +56,7 @@ beforeAll(async () => {
adminPassword: PASSWORD,
backupDir: join(root, 'backups'),
adminHtmlPath: htmlPath,
workerToken: 'w'.repeat(32),
});
});
@@ -195,6 +196,13 @@ describe('routes', () => {
expect((await app.request('/api/admin/media')).status).toBe(401);
expect((await app.request('/api/admin/media', { headers: auth })).status).toBe(200);
// The lyrics-worker's env token works without a DB row.
const wk = { Authorization: `Bearer ${'w'.repeat(32)}` };
expect((await app.request('/api/admin/media', { headers: wk })).status).toBe(200);
res = await app.request(`/api/notes/${VID}/chapters`, json('PUT', { data: { items: [{ t: 5, title: 'W' }] }, baseRev: 0, force: true }, wk));
expect(res.status).toBe(200);
expect((await (await app.request(`/api/notes/${VID}`)).json()).chapters.updatedBy).toBe('api:lyrics-worker');
// Revoked tokens stop working.
await app.request(`/api/admin/tokens/${created.id}`, { method: 'DELETE', headers: { Cookie: cookie } });
res = await app.request(`/api/notes/${VID}/lyrics`, json('PUT', { data: { lines: [] }, baseRev: 4 }, auth));