screentinker/tizen/js
ScreenTinker d018cb24a3 Tizen player: wire up Samsung B2B fleet control (#125)
Brings device:command (reboot / screen_off / screen_on / shutdown / update /
launch) to the Tizen player, at parity with the Android player. Previously app.js
only handled device:reload and device:command did nothing on SSSP panels.

- NEW tizen/js/device-control.js: self-contained IIFE (window.STDeviceControl =
  { run, capabilities, backend }). Feature-detects two Samsung surfaces newest-first
  — webapis.systemcontrol.* (Tizen 6.5/7, synchronous/throws) then
  b2bapis.b2bcontrol.* (SSSP/Tizen 4, async onSuccess/onError) — and normalises both
  to Promises, re-probing each call since the APIs can be injected late. run() never
  rejects; it resolves a uniform { ok, supported, action, note, reload }. Panel power
  tries setPanelMute (mute ON = backlight OFF) then falls back to setDisplayPanel /
  setPanelStatus before declaring unsupported. shutdown is honest: SSSP web API has
  no true power-off, so it mutes the panel and says so. update/reload resolve
  reload:true.
- tizen/js/app.js: keep device:reload; add a device:command handler that calls
  STDeviceControl.run and reports the outcome via reportCmd (device:log tag=command,
  which surfaces as dashboard:device-log, plus a structured device:command-result),
  reloading ~1.2s later when result.reload so the log reaches the server first.
  reportCapabilities() runs on device:registered so the dashboard sees the backend
  ("none" on web/consumer TV).
- tizen/config.xml: add partner-level b2bcontrol + systemcontrol privileges, with a
  note that they need a Samsung Partner distributor cert and are ignored (not fatal)
  on unsigned/URL-Launcher/web/consumer builds.
- tizen/index.html: load $WEBAPIS/webapis.js + $B2BAPIS/b2bapis.js before the app
  scripts (404 harmlessly off-hardware) and device-control.js just before app.js.
- tizen/README.md: document the mapping table + partner-signing caveat; update the
  "Not yet ported" note now that remote control exists.

Verified: node --check on both JS files; config.xml well-formed (xmllint). Not yet
validated on a real SSSP panel — the control surface only takes effect on a
partner-signed .wgt (backend reports "none" on the dev/URL-Launcher build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:17:50 -05:00
..
app.js Tizen player: wire up Samsung B2B fleet control (#125) 2026-06-18 13:17:50 -05:00
device-control.js Tizen player: wire up Samsung B2B fleet control (#125) 2026-06-18 13:17:50 -05:00
player.js feat(scheduling): per-item schedule blocks (#74 dayparting, #75 auto-expire) 2026-06-11 15:46:41 -05:00
schedule-eval.js feat(scheduling): per-item schedule blocks (#74 dayparting, #75 auto-expire) 2026-06-11 15:46:41 -05:00
socket.io.min.js feat(tizen): Samsung Tizen TV web player (.wgt) 2026-06-09 19:01:58 -05:00