Screen sharing #8
@@ -124,7 +124,12 @@
|
||||
|
||||
// Right-click on the picture
|
||||
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>();
|
||||
function fullscreen() {
|
||||
|
||||
@@ -169,7 +169,9 @@ try {
|
||||
|
||||
// The large picture can move to a window of its own
|
||||
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;
|
||||
await streamWindow.waitForFunction(() => (document.querySelector('video') as HTMLVideoElement | null)?.videoWidth! > 0, null, { timeout: 15000 });
|
||||
await view.getByText('Shown in a separate window.').waitFor();
|
||||
|
||||
Reference in New Issue
Block a user