Interface: HostSessionOptions
Defined in: host-session.ts:46
Properties
keepWarm?
optionalkeepWarm?: () =>void
Defined in: host-session.ts:83
Called at ~2 Hz while viewers are connected. A captureStream() canvas emits frames only when it repaints and a still surface deliberately never does — pass () => paper.repaint() for a canvas plane; omit for a tab plane (display capture paces itself).
Returns
void
label
label:
string
Defined in: host-session.ts:53
Shown in every client's session list.
log?
optionallog?: (line) =>void
Defined in: host-session.ts:95
Lifecycle breadcrumbs (register, viewers, refresh, deny). Defaults to a prefixed console.info — the remote path had ZERO logging and its bugs are timing-shaped, so visible-by-default is the point; pass () => {} to silence.
Parameters
line
string
Returns
void
name?
optionalname?:string
Defined in: host-session.ts:56
Human-visible session name ("courageous-beaver") — what the picker shows first. Renameable live via HostSession.setName.
onScroll?
optionalonScroll?: (du,dv) =>void
Defined in: host-session.ts:85
Navigation intents from viewers. What they MEAN belongs to the app.
Parameters
du
number
dv
number
Returns
void
onStatus?
optionalonStatus?: (status) =>void
Defined in: host-session.ts:88
Status snapshots, on every change. Bridge into a signal at the app edge.
Parameters
status
Returns
void
onZoom?
optionalonZoom?: (centerU,centerV,scale) =>void
Defined in: host-session.ts:86
Parameters
centerU
number
centerV
number
scale
number
Returns
void
params?
optionalparams?: (mode) =>PencilParams
Defined in: host-session.ts:68
The brush resolver — the host owns the brush. Defaults to the shipped presets.
Parameters
mode
Returns
presentation?
optionalpresentation?:RemotePresentation
Defined in: host-session.ts:58
How the remote client should present this session (see the protocol).
size?
optionalsize?: () =>Surface
Defined in: host-session.ts:66
The plane, in CSS px — must equal the captured frame (see the module doc). Defaults to surface().size(), which is exactly right for a canvas plane and right for a tab plane whose overlay spans the full viewport.
Returns
stream
stream: () =>
MediaStream|undefined
Defined in: host-session.ts:74
The current plane's media stream, or undefined while there is none (a tab plane before its click-gated grant). Viewers joining during undefined are remembered and offered as soon as HostSession.refresh says otherwise.
Returns
MediaStream | undefined
streamHint?
optionalstreamHint?: () =>string|undefined
Defined in: host-session.ts:76
Why there is no stream yet — the videoStatus: needsGesture detail.
Returns
string | undefined
surface
surface: () =>
PencilSurface
Defined in: host-session.ts:60
The surface remote strokes land on. Read per message — planes may switch.
Returns
url
url:
string
Defined in: host-session.ts:51
The relay's host endpoint, e.g. ws://127.0.0.1:<port>/pencil/host. Same-origin pages can build it with hostRelayUrl.