Bare-minimum functionality to connect to a VNC server using noVNC.
To the user, it is entirely transparent. All variables must be passed by URL params. Reconnection is handled automatically, and the user sees a loading screen while the connection is being established.
Used as part of Doppelganger and test-scrcpy.
host
: The hostname of the VNC server.port
: The port of the VNC server.path
: The path of the VNC server. Default is/websockify
.username
: The username of the VNC server. (Optional)password
: The password of the VNC server.qualityLevel
https://github.com/novnc/noVNC/blob/master/docs/API.md#properties:~:text=Enabled%20by%20default.-,qualityLevel,-Is%20an%20intcompressionLevel
https://github.com/novnc/noVNC/blob/master/docs/API.md#properties:~:text=Disabled%20by%20default.-,compressionLevel,-Is%20an%20intretryDuration
ms between reconnection attempts. Default is 3000.viewOnly
https://github.com/novnc/noVNC/blob/master/docs/API.md#properties:~:text=Disabled%20by%20default.-,viewOnly,-Is%20a%20boolean
pnpm install
pnpm run dev
Useful for projects like https://github.com/regulad/workspaces-images/blob/189d2615d9925d91573d7f00297ebe30bb3b6669/dockerfile-kasm-scrcpy to provide a minimum viable noVNC client for extremely static apps (like scrcpy).
pnpm run build
w