Add transparent OBS lyrics output through presenter pairing

This commit is contained in:
Jonathan Sykes
2026-10-03 14:58:20 +08:00
parent 05e05ebace
commit 7d84fdb3dc
7 changed files with 53 additions and 4 deletions

View File

@@ -33,3 +33,11 @@ test('floating lyrics move the real view and restore it on close', async ({ page
await expect(page.locator('#stageLyrics')).toHaveCount(0);
await popup.close(); await expect(page.locator('#stageLyrics')).toHaveCount(1);
});
test('OBS lower third has a transparent background and renders two cues', async ({ page }) => {
await page.route('**/api/**', route => route.fulfill({ contentType: 'application/json', body: '{"ok":false}' }));
await page.goto('/?overlay=lowerthird&code=123456');
await page.evaluate(() => LowerThird.paint([{ kind: 'line', text: 'Current lyric' }, { kind: 'line', text: 'Next lyric' }], 0));
await expect(page.locator('.obs-current')).toHaveText('Current lyric'); await expect(page.locator('.obs-next')).toHaveText('Next lyric');
expect(await page.evaluate(() => getComputedStyle(document.body).backgroundColor)).toBe('rgba(0, 0, 0, 0)');
await expect(page.locator('#searchInput')).toBeHidden();
});