feat(terminal): the signage player: playlists on a TV, offline, transitions, rotation (platform-v2 step 5.5a)
- terminal/src/apps/signage: plays the screen's playlist (or the one its schedule picks now, switching by itself) full screen: slides in order with their time, a video to its end (a 15 min safety limit), only in their days / hours / dates; transitions fade / slide / zoom / none (CSS, reduced motion respected); the frame turned 90/180/270 for a TV mounted sideways. Picture, video and text slides drawn; a first menu board (5.5b lays it out fully). - Offline: the last GET /api/signage/screen kept in localStorage, every picture and video (up to 120 MB) as an in-memory copy; reads again on signage.changed / device.updated / reconnect / every 5 min. - logic.js: the server's schedule pick ported (same test cases), slide windows, next slide, frame; tests/signage.test.mjs (6). - Signage screens get no offline banner over the slides, a small mark instead (registry QUIET_OFFLINE). - e2e signage.mjs (in run-all): a paired TV plays picture → text → video → menu in order, the text's slide transition, rotation, keeps playing with the server stopped (mark, no banner), catches up when it is back. terminal.mjs passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,10 +5,10 @@ import { APPS, appLoader } from '../src/apps/registry.js'
|
||||
import { DEVICE_KEY, SESSION_KEY, createDeviceStore } from '../src/device/storage.js'
|
||||
import { deviceGone, formatCode, idleExpired, liveAction, pollOutcome, refusedAction, screenFor } from '../src/device/flow.js'
|
||||
|
||||
test('the apps a screen can run: KDS, counter POS, customer display (signage + menu tablet in phase 5)', () => {
|
||||
assert.deepEqual(Object.keys(APPS).sort(), ['customer_display', 'kds', 'pos_counter'])
|
||||
test('the apps a screen can run: KDS, counter POS, customer display, signage (the menu tablet in 5.7)', () => {
|
||||
assert.deepEqual(Object.keys(APPS).sort(), ['customer_display', 'kds', 'pos_counter', 'signage'])
|
||||
assert.equal(typeof appLoader('kds'), 'function')
|
||||
assert.equal(appLoader('signage'), null)
|
||||
assert.equal(appLoader('menu_tablet'), null)
|
||||
assert.equal(appLoader('toString'), null) // never a prototype member
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user