A web page asset can be marked interactive. On a screen with a touchscreen, people can then tap, scroll and use the page like a kiosk: a menu, a wayfinding map, a sign-up form. Everything else in the playlist stays untouchable.
How it behaves
- Nobody touching it: the page plays like any other asset and the playlist moves on when its duration is up.
- Someone starts using it: the playlist waits on this page for as long as they keep using it, even past its duration. Auto-refresh is held off too, so the page doesn’t reload under their finger.
- They walk away: once nobody has touched the screen for the page’s idle time (60 seconds unless you change it), the page starts over. Its cookies, cache and stored data are wiped, so the next person doesn’t see what the last one did, and the page goes back to its own address. If the asset’s duration is already up, the playlist then moves on.
Touch is only ever accepted on an interactive page. Images, videos and ordinary web pages ignore every tap, click and key press.
To keep a passer-by from wandering off to the rest of the internet, an
interactive page can only follow links within its own site (same scheme,
host and port). If the asset’s address redirects somewhere else when it
loads (for example from http:// to https://), the site it lands on
counts as its own too. Links to other sites do nothing, and neither does
a link that redirects to another site, unless you list that site under
Allowed sites (see below). Pinch-zoom, the
right-click / long-press menu and file pickers are turned off.
Setting it up
In the asset’s Edit dialog, open the advanced section of a web page asset, switch on Interactive (touch), and set Reset after idle (seconds) (5 to 3600).
Allowed sites
If the kiosk needs to open pages on other sites (a booking page on another domain, a sign-in or payment step), list them under Allowed sites, one per line. Each line can be:
- a host, such as
booking.example.com(any scheme or port); *.example.com, forexample.comand all its subdomains;- a full origin, such as
https://pay.example.com:8443, to allow only that scheme and port.
The page’s own site is always allowed, so most kiosks leave this empty. Up to 50 entries; the edit dialog drops lines it can’t read, and the API rejects them.
Over the API
The same settings are fields on /api/v2/assets:
| Field | Type | Default | Effect |
|---|---|---|---|
interactive | boolean | false | Accept touch on this web page asset |
idle_timeout_s | integer, 5-3600 | 60 | Seconds without a touch before the page starts over |
allowed_sites | list of strings | [] | Extra sites the page may open (see above) |
touch_home | boolean | false | Start here on touch (see below); only one asset at a time |
curl -sk -X PATCH -H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{"interactive": true, "idle_timeout_s": 90, "allowed_sites": ["booking.example.com"]}' \
"https://<device-ip>/api/v2/assets/<asset-id>"
Touch to start
Normally a touch on an image, a video or an ordinary web page is ignored, so a visitor has to wait for the kiosk page to come round. To skip the wait, switch on Start here on touch for that page (in its edit dialog, under Interactive (touch)):
- A touch on any other asset jumps straight to that page, usually within a second.
- That first touch only wakes the screen. It doesn’t press whatever happens to be under the finger on the page that appears.
- When the visitor leaves, the page resets after its idle time. If the page’s duration is already up, the playlist moves on straight away; otherwise the fresh page stays until it is. The playlist then carries on with the asset after the one that was interrupted. An interrupted video plays from the start next time.
Only one asset can be the touch home page. Switching it on for one asset switches it off for the one that had it. Only interactive web page assets can have it, and an asset that stops being interactive loses it. If the touch home page is disabled or outside its schedule, touches on other assets are ignored as usual; it never overrides your schedule. Touches while the screen is switched off by the display schedule are ignored too.
Because it’s part of the asset, it’s published to managed screens with the rest of the asset’s settings when you use a controller.
Over the API this is the touch_home field on /api/v2/assets.
Usage statistics
If you haven’t opted out of anonymous usage statistics, Anthias reports once a day whether the screen has a touchscreen and how many interactive pages are enabled. On a day when people used one, it also reports how many visits there were, their total length, and how many lasted under 10 seconds, 10 to 60 seconds, 1 to 5 minutes, and longer. A visit runs from the first touch to the last one before the page goes idle or leaves the screen. With touch to start, it also reports whether a touch home page is set, how many visits started with a touch on another asset, and how many touches were ignored because no interactive page was on screen. No addresses, page content, tap positions or anything typed are sent. Opting out turns this off together with the rest of the usage statistics, and the screen stops counting.
Requirements and limits
- Boards: Raspberry Pi 3 (64-bit), Pi 4, Pi 5, x86 and other 64-bit boards. The 32-bit Raspberry Pi OS builds (Pi 1, 2 and 3) don’t support touch.
- Install type: Raspberry Pi OS / Debian installs. Balena deployments don’t support touch yet.
- Touchscreens and keyboards only. A mouse isn’t passed through to the screen, so no pointer appears on your signage.
- Connect the touchscreen before the screen starts. A touchscreen
plugged in later isn’t picked up until the viewer restarts (a reboot,
or
docker restart anthias-anthias-viewer-1). - Rotated screens: touch turns with the screen’s rotation setting.
Changing the rotation on a screen with a touchscreen restarts the
viewer (a few seconds of black) so touch is recalibrated for the new
angle. If your touchscreen needs its own calibration, a
LIBINPUT_CALIBRATION_MATRIXudev rule on the host is kept as is. - An interactive page runs in its own private browser session, kept in memory. The reset throws that session away and starts a new one, so everything a visitor left behind goes with it: cookies, cache, local and session storage, IndexedDB and service workers, on every site they reached (including allowed sites). Because of this, an interactive page doesn’t stay logged in to anything between visitors or across restarts; ordinary web pages keep their logins as before.