Skip to content

Interface: ClientSessionOptions

Defined in: client-session.ts:43

Properties

log?

optional log?: (line) => void

Defined in: client-session.ts:69

Lifecycle breadcrumbs (join, offers, track state). Defaults to a prefixed console.info; pass () => {} to silence.

Parameters

line

string

Returns

void


mode

mode: () => PencilMode

Defined in: client-session.ts:53

Returns

PencilMode


onClose?

optional onClose?: () => void

Defined in: client-session.ts:66

Returns

void


onHostGone?

optional onHostGone?: () => void

Defined in: client-session.ts:61

Returns

void


onJoined?

optional onJoined?: (host, label, presentation?) => void

Defined in: client-session.ts:59

Parameters

host

string

label

string

presentation?

RemotePresentation

Returns

void


onJoinRejected?

optional onJoinRejected?: (reason) => void

Defined in: client-session.ts:60

Parameters

reason

string

Returns

void


onSessions?

optional onSessions?: (sessions) => void

Defined in: client-session.ts:58

Parameters

sessions

SessionInfo[]

Returns

void


onVideoDown?

optional onVideoDown?: () => void

Defined in: client-session.ts:65

Returns

void


onVideoStatus?

optional onVideoStatus?: (status) => void

Defined in: client-session.ts:62

Parameters

status

VideoStatus

Returns

void


onVideoUp?

optional onVideoUp?: () => void

Defined in: client-session.ts:64

The track is attached and (dis)connected — drive "waiting…" chrome.

Returns

void


overrides?

optional overrides?: () => StrokeOverrides | undefined

Defined in: client-session.ts:55

The user's brush knobs, when the joined host's presentation offers them.

Returns

StrokeOverrides | undefined


surface

surface: () => Surface

Defined in: client-session.ts:50

The plane, CSS px — the video's CONTENT box, not its element box.

Returns

Surface


tool

tool: () => Tool

Defined in: client-session.ts:52

The instrument, as this client currently holds it.

Returns

Tool


url

url: string

Defined in: client-session.ts:48

The relay's client endpoint, e.g. ws://<mac>:<port>/pencil/client. Same-origin pages can build it with clientRelayUrl().


video

video: () => HTMLVideoElement | undefined

Defined in: client-session.ts:57

Where the host's track lands. Read when the offer arrives.

Returns

HTMLVideoElement | undefined