screentinker/brightsign/autorun.brs
ScreenTinker 41ebb02368 Add a BrightSign capability probe
Not a port — a way to answer on real hardware the questions that decide what a port
looks like, instead of guessing them from documentation.

The one that matters is persistence. ScreenTinker's device identity (deviceId,
deviceToken, paired, serverUrl) lives in localStorage, and on BrightSign that behaves
like sessionStorage: without a durable store every panel re-pairs on every boot and
spawns a new device row. The registry is the alternative, so the probe reports whether
it resolves and whether either store survives a power cycle.

It runs LOCALLY first on purpose. That establishes whether the @brightsign/* modules
resolve at all, separately from whether a remotely-served page can reach them — the
question that decides between reusing the hosted web player and building a local shim
that owns the registry and passes identity to an iframe via postMessage. Without that
split a failure is ambiguous: an origin restriction and nodejs_enabled not taking look
identical. Once local works, changing one line points it at a hosted copy and the
delta is the answer.

Also reports the web-platform features the player leans on — service workers and the
Cache API for content caching, h264 in <video>, CSS clamp() for the directory-search
keyboard — plus model, OS and Chromium version, since Series 4 is pinned to Chromium
87 and would give a misleadingly pessimistic result.

SD-card ready: FAT32, both files at the root, empty card. Remote devtools on :2999.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 22:49:50 -05:00

34 lines
1.2 KiB
Plaintext

' ScreenTinker — BrightSign capability probe
'
' Drop this plus probe.html on a FAT32 SD card (root, nothing else), insert, power on.
' It opens the local probe page with Node.js enabled so the @brightsign/* modules are
' injected, then the page reports what actually resolves on THIS model and OS build.
'
' Deliberately local-first: the whole point of the probe is to establish the baseline
' (what a LOCAL page can reach) before testing whether a REMOTE page reaches the same.
Sub Main()
videoMode = CreateObject("roVideoMode")
r = CreateObject("roRectangle", 0, 0, videoMode.GetResX(), videoMode.GetResY())
config = {
url: "file:///probe.html"
nodejs_enabled: true ' REQUIRED for require("@brightsign/*")
inspector_server: { port: 2999 } ' remote devtools: http://<player-ip>:2999
storage_path: "SD:/"
storage_quota: 1073741824
javascript_enabled: true
mouse_enabled: true
}
html = CreateObject("roHtmlWidget", r, config)
html.Show()
' Keep the script alive; the page does the work.
msgPort = CreateObject("roMessagePort")
html.SetPort(msgPort)
while true
msg = wait(0, msgPort)
end while
End Sub