Screen sharing #8

Merged
kibi merged 6 commits from screen-sharing into main 2026-10-01 20:40:25 +00:00
2 changed files with 9 additions and 2 deletions
Showing only changes of commit b5dda4e1c2 - Show all commits
+6 -1
View File
@@ -124,7 +124,12 @@
// Right-click on the picture // Right-click on the picture
let showStats = $state(false); let showStats = $state(false);
const streamMenu = (e: MouseEvent) => menu.show(e, [{ label: 'Stats for nerds', checked: showStats, action: () => (showStats = !showStats) }]); const streamMenu = (e: MouseEvent) => menu.show(e, [
{ label: 'Open in a separate window', action: popOut },
{ label: 'Full screen', action: fullscreen },
{ separator: true, label: '' },
{ label: 'Stats for nerds', checked: showStats, action: () => (showStats = !showStats) }
]);
let frame = $state<HTMLElement>(); let frame = $state<HTMLElement>();
function fullscreen() { function fullscreen() {
+3 -1
View File
@@ -169,7 +169,9 @@ try {
// The large picture can move to a window of its own // The large picture can move to a window of its own
const opened = bob.app.waitForEvent('window'); const opened = bob.app.waitForEvent('window');
await view.getByRole('button', { name: 'Open in a separate window' }).click(); // From the right-click menu on the picture
await bob.page.locator('.spot video').click({ button: 'right' });
await bob.page.getByRole('menuitem', { name: 'Open in a separate window' }).click();
const streamWindow = await opened; const streamWindow = await opened;
await streamWindow.waitForFunction(() => (document.querySelector('video') as HTMLVideoElement | null)?.videoWidth! > 0, null, { timeout: 15000 }); await streamWindow.waitForFunction(() => (document.querySelector('video') as HTMLVideoElement | null)?.videoWidth! > 0, null, { timeout: 15000 });
await view.getByText('Shown in a separate window.').waitFor(); await view.getByText('Shown in a separate window.').waitFor();