feat(lotus): in-frame "Share your screen?" prompt replaces the corner button (cinny #43)
Where the host can't delegate the user's click (Firefox, Safari, WebKitGTK), lotus.20 showed EC's own screenshare button floating in the frame's corner, apart from the host's call bar. Now the host keeps its bar button and sends the new toWidget io.lotus.prompt_screenshare; the fork shows a small "Share your screen?" card inside the frame, just above the bar, and its Share button starts the share with the frame's own click. Same two clicks as the host's confirm on Chromium. - The card focuses Share; Cancel and Escape close it; it closes if a share starts some other way or the room's call policy stops allowing sharing, and never opens where the policy forbids it (set_frame_screenshare). - Picture-in-picture (~158 px tall): compact card without the description. - controls_state: frameScreenshare is now always false (the corner button is gone), screensharePrompt says the host should use the prompt, and screensharePromptOpen lets the host stop covering the frame meanwhile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9e4ddb3eb6
commit
bb675fa50e
@@ -92,6 +92,12 @@ export enum LotusWidgetActions {
|
||||
* policy forbids screensharing (cinny #43). Defaults to visible.
|
||||
*/
|
||||
SetFrameScreenshare = "io.lotus.set_frame_screenshare",
|
||||
/**
|
||||
* toWidget: `{}` — show the "Share your screen?" prompt inside this frame
|
||||
* (cinny #43). For hosts that can't delegate the user's click: the prompt's
|
||||
* Share button is clicked here, so getDisplayMedia gets its activation.
|
||||
*/
|
||||
PromptScreenshare = "io.lotus.prompt_screenshare",
|
||||
/**
|
||||
* fromWidget: a watched key went down/up here, or this window's focus
|
||||
* changed; see `LotusHotkeyReport` (cinny #43).
|
||||
@@ -99,7 +105,8 @@ export enum LotusWidgetActions {
|
||||
Hotkey = "io.lotus.hotkey",
|
||||
/**
|
||||
* fromWidget: `{ screensharing: boolean, layout: "grid" | "spotlight" | null,
|
||||
* screenshareAction: true, hotkeys: true, frameScreenshare: boolean }`
|
||||
* screenshareAction: true, hotkeys: true, frameScreenshare: false,
|
||||
* screensharePrompt: boolean, screensharePromptOpen: boolean }`
|
||||
* whenever either changes (cinny #43), so the host stops reading EC's DOM for
|
||||
* them. Its arrival also tells the host this fork supports the actions above.
|
||||
*/
|
||||
@@ -125,4 +132,5 @@ export const LOTUS_TO_WIDGET_ACTIONS: LotusWidgetActions[] = [
|
||||
LotusWidgetActions.SetScreenshare,
|
||||
LotusWidgetActions.SetHotkeys,
|
||||
LotusWidgetActions.SetFrameScreenshare,
|
||||
LotusWidgetActions.PromptScreenshare,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user