From 0cfa09046cd4ce972b526eb2f7cc65224aa96cc0 Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Tue, 9 Jun 2026 19:01:58 -0500 Subject: [PATCH] feat(tizen): Samsung Tizen TV web player (.wgt) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ports the ScreenTinker player to a Tizen TV / signage web app, speaking the SAME /device socket.io protocol as the Android player — no server changes; a Tizen display pairs from the same dashboard. - app.js: device protocol client — register (pairing_code | device_id+token), device:registered/paired/unpaired/playlist-update, 15s heartbeat, keep-awake. Always reaches the server prompt until the display is actually paired; a saved-but-unreachable server falls back to the prompt (no blank screen); BACK returns to it. - player.js: fullscreen single-zone renderer — image (duration timer), video (play-to-end + loop), YouTube (iframe embed), widget (iframe render endpoint). - config.xml: Tizen TV manifest; build-wgt.sh packages (signs if Tizen CLI present, else unsigned); README covers URL-Launcher and signed-.wgt deploy. Validated: headless protocol test vs the live server passed end-to-end (register -> pair -> reconnect-auth -> playlist(2) -> content 200); loads + renders in Chromium with no JS errors. Not yet ported (fullscreen single-zone covers most signage): multi-zone, video walls, screenshots, remote control, self-OTA. .wgt is a build artifact (gitignored). --- tizen/.gitignore | 7 + tizen/README.md | 70 ++++++++++ tizen/build-wgt.sh | 22 ++++ tizen/config.xml | 27 ++++ tizen/css/style.css | 72 +++++++++++ tizen/icon.png | Bin 0 -> 21200 bytes tizen/index.html | 45 +++++++ tizen/js/app.js | 266 ++++++++++++++++++++++++++++++++++++++ tizen/js/player.js | 177 +++++++++++++++++++++++++ tizen/js/socket.io.min.js | 7 + 10 files changed, 693 insertions(+) create mode 100644 tizen/.gitignore create mode 100644 tizen/README.md create mode 100755 tizen/build-wgt.sh create mode 100644 tizen/config.xml create mode 100644 tizen/css/style.css create mode 100644 tizen/icon.png create mode 100644 tizen/index.html create mode 100644 tizen/js/app.js create mode 100644 tizen/js/player.js create mode 100644 tizen/js/socket.io.min.js diff --git a/tizen/.gitignore b/tizen/.gitignore new file mode 100644 index 0000000..d7af2c1 --- /dev/null +++ b/tizen/.gitignore @@ -0,0 +1,7 @@ +# Build artifacts (regenerated by build-wgt.sh) +ScreenTinker.wgt +*.wgt +# Test / scratch files +_* +.buildResult +.manifest.tmp diff --git a/tizen/README.md b/tizen/README.md new file mode 100644 index 0000000..accb4a6 --- /dev/null +++ b/tizen/README.md @@ -0,0 +1,70 @@ +# ScreenTinker — Tizen TV Player (`.wgt`) + +A Samsung **Tizen TV / signage** web port of the ScreenTinker player. It speaks the +**exact same `/device` socket.io protocol** as the Android player, so a Tizen +display pairs and plays from the same dashboard with no server changes. + +## What it does +- Enter a server URL → connects to `{server}/device` (socket.io v4). +- Registers, shows a **6-digit pairing code**; you claim it in the dashboard + (Devices → Pair a display). On `device:paired` it switches to playback. +- Reconnects automatically with a stored `device_id` + `device_token`. +- Renders **fullscreen single-zone** playlists, looping: + - **image** → shown for `duration_sec` (min 3s) + - **video** (`/api/content/{id}/file` or `remote_url`) → plays to end, then next; single item loops + - **YouTube** (`mime video/youtube`) → muted autoplay `