Streams: long-press menu on touch screens, show connecting and failure over the picture

A stream counted as live as soon as its track was announced, before any route
existed, so a viewer whose connection never came up saw a black picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 22:52:16 +02:00
co-authored by Claude Opus 5.5
parent 950a1afad7
commit 9832ba2749
3 changed files with 50 additions and 9 deletions
+11
View File
@@ -179,6 +179,17 @@ try {
console.log(`ok: stats for nerds (viewer: ${viewerStats.slice(0, 200)}...)`);
assert.ok(sharerStats.includes('Round trip'));
// Touch screens: holding a finger on the picture opens the same menu
await bob.page.evaluate(() => {
const el = document.querySelector('.spot .pic')!;
const r = el.getBoundingClientRect();
const touch = new Touch({ identifier: 1, target: el, clientX: r.left + 40, clientY: r.top + 40 });
el.dispatchEvent(new TouchEvent('touchstart', { touches: [touch], bubbles: true }));
});
await bob.page.getByRole('menuitem', { name: 'Stats for nerds' }).waitFor({ timeout: 3000 });
await bob.page.keyboard.press('Escape');
console.log('ok: long press on the picture opens the menu');
// The large picture can move to a window of its own
const opened = bob.app.waitForEvent('window');
// From the right-click menu on the picture