Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module core/app/kiosk/watchdog

    Reload an unattended display whose WebGL context never comes back.

    The last resort, and deliberately last. The viewer already recovers from context loss on its own (scene/scene-manager/render-pipeline/ webgl-context-recovery.ts), and a reload throws away every warm cache the display has built — on a large scene that is a visibly blank screen for seconds. So this waits out a grace period and only fires if recovery has not happened.

    It listens on the canvas ITSELF rather than hooking the recovery module. That is not a shortcut: DOM events have many listeners, so observing the same webglcontextlost / webglcontextrestored pair needs no plumbing through three layers, cannot interfere with recovery, and inherently gives recovery first refusal — the grace timer is simply cancelled if the context returns.

    Ports-injected (timers, reload, canvas) so a test can drive it without a browser, and so nothing here reaches for a singleton it was not handed.

    KioskWatchdogPorts
    KioskWatchdog
    startKioskWatchdog