Skip to content
OpenComputer

Browser, screenshots and video

Computer has no browser tool; a session renders pages, images and video with Playwright, headless Chromium and ffmpeg on the computer

The session posts the result to the thread with send_file or calvin-send-file.

computer posts pricing.png into the thread with a comment: a screenshot of a pricing page with three plan cards of equal height

Installed software

deploy/vm/provision.sh installs:

SoftwareDetail
PlaywrightThe playwright npm package, installed globally. Version: PLAYWRIGHT_VERSION in provision.sh (default 1.64.1).
ChromiumPlaywright’s chromium and chromium-headless-shell builds, with their system libraries. Headless.
ffmpegFrom the distribution’s packages.
Fontsfonts-dejavu-core, fonts-liberation2, fonts-noto-core, fonts-noto-cjk, fonts-noto-color-emoji: Latin, CJK and emoji.

If the browser download fails during provisioning, provision.sh prints a warning and continues. The first session that needs a browser then downloads it.

Use in a session

  • The session writes render scripts in a scratch directory under $TMPDIR and runs npm link playwright there, so no repository’s dependencies change.
  • The browser runs on the computer, so a script opens a dev server the session started at localhost, without a preview URL.
  • The session’s instructions ask for one visual per reply unless more are requested, and for a screenshot over a video unless motion is the point.

Secrets in screenshots

send_file refuses a file whose bytes contain a secret’s value; it cannot see a secret drawn on a screenshot. The session’s instructions say not to post a screenshot that shows credentials or personal data; nothing enforces that.