Skip to content

Playout UI


title: Playout UI description: The room-TV UI: home page, TV Guide, channels and tools, built once per property. audience: internal type: explanation owner: platform-team last_reviewed: 2026-11-18


The page the hotel guest sees on the room TV: home page (greeting, weather, menu tiles), TV Guide and channel surfing, tools (currency, weather, world time, flights), Netflix/YouTube tiles, language menu, welcome page. React 19 + Vite, built once per customer (a property). It runs inside an iframe of the webOS or Tizen launcher, and standalone in a browser while developing.

Repository: https://mashup.castis.io/multi-cdn/launcher-app (folder playout-app/, branch feature/dev).

Not PlayoutAdmin

PlayoutAdmin is the operators' web console for media and playback. This page is about the app on the TV.

Run and build

npm install
npm run dev:phoenix           # browser, hot reload; also dev:sunway, dev (= playtelly)
npm run build:phoenix         # dist/   (also build:sunway, build:playtelly)
npm run build:phoenix -- --outDir <launcher>/playout --emptyOutDir     # straight into a launcher
npm run lint

A build contains exactly one property (a folder in src/properties/, chosen by Vite --mode). There is no automated test suite yet.

Properties (one folder per customer)

src/properties/<name>/
  index.js        exports { content, discover, flights }
  content.json    property { name, wifi, weather, brand }, menus, services
  discover.json   data of the Discover tool
  flights.json    the bundled flight board (fallback)
  theme.css       design tokens (:root custom properties), imported last
  brand/          local assets (logo, background)
  i18n/           the customer's texts in ko, vi, th, zh
.env.<name>       optional VITE_* values (e.g. VITE_GUEST_APP_URL)

Properties today: phoenix, sunway, playtelly (the company's own demo). To add a customer: copy playtelly/ to <name>/, edit content.json, the two tool files and theme.css, add build:<name> and dev:<name> scripts. Features only some customers have (golf for Phoenix, restaurant booking for Sunway) are not modules yet.

How the launcher starts it

The launcher opens index.html with URL parameters:

Parameter Meaning
deviceId, token the paired device and its token
apiIp CoreAPI address (the app adds /api/v1/...)
workspaceId the device's workspace (channel groups)
mqttUrl, mqttUser, mqttPassword the broker the TV listens on (tellyboard/devices/<deviceId>/player/command)
guestAppUrl where the guest-app QR codes point (otherwise VITE_GUEST_APP_URL, otherwise staging)
caps=apps the launcher can open and list other TV apps
channelId the channel watched last time

Messages with the launcher (postMessage): GET_TV_IP, OPEN_APP, GET_INSTALLED_APPS / INSTALLED_APPS, INSTALL_APP / INSTALL_APP_RESULT, CHANNEL_GROUPS_*.

What it calls

What Call
Channels GET /api/v1/devices/:id/channels/groups (or /api/v1/playback/:workspace/channel-groups)
Guest, room, welcome GET /api/v1/concierge/tv/stay, /tv/room, /tv/welcome; POST /tv/welcome/viewed
Phone pairing, cast /concierge/tv/pins/..., /tv/devices/:id/pairing, /tv/cast/session
Tools /concierge/tv/fx (currency), /tv/weather, /tv/worldtime, /tv/flights; each falls back to its old source when CoreAPI cannot answer (src/tvInfoApi.js)

Commands the TV obeys (MQTT)

OK, UP, DOWN, LEFT, RIGHT, NEXT_CHANNEL, PREV_CHANNEL (BACK/RETURN are accepted, but CoreAPI does not send them yet), NAVIGATE (target = a menu name or Watch, optional item), JUMP_CHANNEL, OPEN_APP, PORTAL_OPEN, STAY_CHECKOUT. Key-type commands go to the focused element, like a press on the TV's own remote, so every menu (including the language menu) reacts (onCommand in src/home/Home.jsx).

Features

  • Welcome page from /tv/welcome; stays until OK; guest name from the stay, fallback Guest.
  • Watch TV card plays the first channel whose genre is promo; OK opens full channel surfing.
  • TV Guide: channels grouped by category; Right opens the channel detail; the list and the genre tabs scroll with focus.
  • Channel change: one reused player, the neighbouring channels are preloaded, the stream starts 0.3 s after the last key press.
  • Tools: currency, weather, world time (server clock), flight schedule, Discover, ambient scenes.
  • Languages: EN, KO, VI, ZH, TH with a language menu on the TV.
  • Netflix / YouTube tiles with their logos; Install and the store link when the app is missing.

Things that are easy to get wrong

  • Old TV browsers (Chrome 56 to 69: Tizen 4/5, webOS). Avoid gap in flex (there is a .no-flex-gap fallback), inset, aspect-ratio, clamp(), Object.fromEntries, backdrop-filter (slow). The build uses @vitejs/plugin-legacy.
  • Sizes are written in px and converted to rem at build time (postcss-pxtorem); src/fit.js sets the root font size so the UI fits any screen. Design for 1920×1080.
  • Text is keyed by its exact English string: t("Good morning"). Add the translation to src/i18n/ui.<lang>.json and src/properties/<name>/i18n/<lang>.json. Fonts Inter, Tinos and Noto (Thai) are bundled; Chinese and Korean fonts come from the TV.
  • Keys: use isBackKey(e) from src/keys.js (Tizen Return = keyCode 10009, webOS 461, desktop Escape/Backspace).
  • http, not https, for artwork and streams: the TVs' certificate store is too old (plainHttp in src/playoutApi.js).

Debugging on a TV

Press the yellow remote key. The overlay shows the engine and CSS support, ids, the API / MQTT / QR addresses, the Home-key log (Tizen), the artwork and stream addresses of the first channels and whether their images load (logo none sent means the backend sent no address), guest lookups, the last channel start time, and the last errors (src/DebugOverlay.jsx).

Layout

src/home/             home page, TV Guide, tools, welcome screen, full-screen channel
src/properties/       one folder per customer
src/i18n/             translations and language helpers
src/PlayoutPlayer.jsx video playback (Shaka, loaded on first use)
src/playoutApi.js     CoreAPI calls        src/tvInfoApi.js   weather / world time / flights
src/usePlayoutMqtt.js MQTT client          src/DebugOverlay.jsx  the yellow-key page