mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-29 09:23:16 -06:00
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>
|
||
|---|---|---|
| .. | ||
| app.js | ||
| device-control.js | ||
| player.js | ||
| schedule-eval.js | ||
| socket.io.min.js | ||