Skip to content
developers
Developer home

VISWOO DOCUMENTATION

Screen bridge

The bridge the screen view uses to talk to the player (`viswoo-player.js`; inlined when packing).

The bridge the screen view uses to talk to the player (viswoo-player.js; inlined when packing).

window.Viswoo.player: Every method returns a Promise. On an old player the bridge does not answer (timeout).

Method Permission Description
Viswoo.player.context(): Promise<PlayerContext> — Screen, language, settings, touch and public page address.
Viswoo.player.hold(seconds: number): Promise<void> — Extends the item (e.g. when someone touches it); at most MAX_HOLD_SECONDS (120). Calling again renews it.
Viswoo.player.done(): Promise<void> — Ends the item; the player moves on to the next one.
Viswoo.player.call<T = unknown>(action: string, payload?: unknown): Promise<T> depends on the action Server action: built-in draw (draw permission), codes.issue (codes permission) or an action forwarded to the plugin server (server permission).
Viswoo.player.report(name: string, count?: number): Promise<void> events Event counter; the player sends in batches and keeps them while offline.

Context of the screen view.

Field Type Description
code string
version string
language 'tr' | 'en' Screen language (the customer language).
screen { id: string; name: string; orientation: 'landscape' | 'portrait' }
settings Record<string, unknown> The customer plugin settings; server-only fields are removed.
touch boolean True when the shell reports a touch screen (may be unverified).
duration number Planned duration of the item, in seconds.
publicUrl string | null Address of the public page (public permission), shown as a QR code. Otherwise null.