OptionalactiveOptionalclearDefaults to 'sharer-only'.
Whether this client is the room owner — gates clearAllPermission if set to 'owner-only'.
Whether this client owns the screen share shareId is associated with.
This client's user id (for stroke attribution).
OptionalpermissionDefaults to 'everyone'.
Stable id keying the annotation state — typically the
screen-sharer's user id. Two concurrent shares get two distinct
shareIds and don't cross-talk.
Whether this share session is currently active. Defaults to
truefor back-compat with consumers that don't pass it.Lifecycle: when this flips from
truetofalse, the hook drops its stroke set and the drawing-locked state — a screen share that has ended must not leave stale annotations behind. The local clear is enough because every peer flips this independently when they observe the share stopping (viauseScreenSharingParticipants), so no broadcast is needed; everyone resets in lock-step.Snapshot exchange is also gated on this flag, so an inactive layer neither requests nor responds to snapshots — that prevents a peer who hasn't yet observed the new share from answering with empty state and starving the requester.