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>
37 lines
2 KiB
XML
37 lines
2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets"
|
|
id="http://screentinker.com/player" version="1.9.1" viewmodes="maximized">
|
|
<tizen:application id="ScrnTinkr1.ScreenTinker" package="ScrnTinkr1" required_version="2.4"/>
|
|
<tizen:profile name="tv"/>
|
|
<name>ScreenTinker</name>
|
|
<author email="support@screentinker.net">ScreenTinker</author>
|
|
<description>ScreenTinker digital signage player</description>
|
|
<icon src="icon.png"/>
|
|
<content src="index.html"/>
|
|
|
|
<!-- Landscape signage, no context menu, allow background, keep app full-screen -->
|
|
<tizen:setting screen-orientation="landscape" context-menu="disable"
|
|
background-support="enable" encryption="disable"
|
|
install-location="auto" hwkey-event="enable"/>
|
|
|
|
<feature name="http://tizen.org/feature/screen.size.all"/>
|
|
|
|
<!-- Allow the player to reach any signage server + load remote media / YouTube -->
|
|
<access origin="*" subdomains="true"/>
|
|
<tizen:allow-navigation>*</tizen:allow-navigation>
|
|
|
|
<tizen:privilege name="http://tizen.org/privilege/internet"/>
|
|
<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
|
|
<tizen:privilege name="http://tizen.org/privilege/display"/>
|
|
<tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
|
|
|
|
<!-- #125: Samsung B2B fleet control (reboot / panel power via b2bcontrol /
|
|
systemcontrol). These are PARTNER-level privileges: they only take effect
|
|
when the .wgt is signed with a Samsung Partner distributor certificate on a
|
|
real SSSP panel. On unsigned / URL-Launcher / web / consumer-TV builds they
|
|
are ignored (not fatal) — the APIs are simply absent and device-control.js
|
|
reports "unsupported". -->
|
|
<tizen:privilege name="http://developer.samsung.com/privilege/b2bcontrol"/>
|
|
<tizen:privilege name="http://developer.samsung.com/privilege/systemcontrol"/>
|
|
</widget>
|