--- title: Configuration audience: developers summary: The URL the tablet opens, the brand it wears, the language it speaks, and the flags for testing. description: "Configure the World of Regions livestream tablet: backend address, white-label branding, language, transport selection, preview mode and debugging." order: 3 updated: "2026-09-14" --- Two things configure a tablet, and it is worth keeping them apart. **The session** carries everything that should follow the customer — the brand, the language, what they are allowed to touch — and your desktop application sets it. **The URL** carries what belongs to the device or to whoever is testing it. ## Where the tablet points The tablet talks to one backend, and by default it is ours: ```text https://livestream.world-of-regions.com/api ``` That address is absolute on purpose, whatever host serves the app. On a white-label domain a same-origin `/api` would fall through to the single-page fallback and answer with the app's own `index.html` — at status 200, so the failure arrives as a JSON parse error rather than as a 404. Two overrides, in order of precedence: | Override | Where | Use it for | |---|---|---| | `?api=` | the URL | Pointing one device at another backend without rebuilding. | | `VITE_LS_API` | build environment | A deployment that always talks to somewhere else. | Cross-origin is expected and supported: the backend echoes the caller's `Origin` and exposes `X-Livestream-Device`, which is the one response header the transport has to read back. ## Branding The palette arrives with the session, so the tablet is already wearing the agency's colours by the time the customer looks at it. You send a small set of values and the rest is derived: | Value | What it sets | |---|---| | `brand` | The accent. A deeper text shade and a tint are derived from it, each mixed against the background so the result stays readable rather than blue-on-blue. | | `background` | The page **and every card surface**. A saturated colour here flattens the whole interface into one field — it is the setting most worth testing before a shop sees it. | | `text` | The ink. Left out, it is chosen automatically against the background. | | `nav` | The bar. | | `stars` | The rating colour. | Everything else — muted inks, hairlines, the input surface, elevation — is mixed from those against the background, so a partner supplies five values rather than fifty. **One colour is deliberately not themeable:** the text over photography stays white in every palette. It sits on somebody's holiday photograph, not on your background, and following the theme there is how it becomes unreadable. Before a session exists there is nothing to theme from, which matters for the pairing screen. Pass the brand in the URL and it applies immediately: ```text ?brand=%231f6fb2&name=Your%20Agency&logo=https://example.com/logo.svg ``` ## Language The **operator** decides, not the device. `config.language` on the session is applied when the session lands and remembered for the next boot, so a tablet keeps its language between customers. That is deliberate: the device's own OS language is not evidence. An English Android tablet in a Polish agency still serves Polish customers. Polish is the source language here — copy is authored in Polish and translated outward, which inverts the convention on the rest of World of Regions. A language that has not been published yet falls back to Polish rather than to key names. ## Flags for testing None of these are meant for a live tablet, and two of them will damage a live session if you use them on one. | Flag | Does | |---|---| | `?transport=poll` | Forces the polling path, ignoring the socket. | | `?transport=ws` | Pins the socket and never falls back — for debugging the transport itself, where an automatic fallback hides what you came to see. | | `?preview=1` | Local-only mirror mode, for embedding the tablet in a desktop panel. It claims nothing and polls nothing; the desktop pushes state in directly. | | `?previewOrigin=` | Restricts a preview to accept pushes from one origin only. | | `?debug=1` | Loads an on-screen console, so a tablet in a shop can be asked for one. | > **Never open a live session with `?preview=1` missing on an embedded mirror.** A preview that > reaches the network registers as a second tablet, takes the session's only device slot, and keeps > resetting the idle window — so a session whose real tablet has been put down never times out.