webapp: introduce Laravel app under webapp/ for scene overlays
Replaces the per-scene HTML directories (landing/, loading/, game/,
desktop/, goodbye/, music-box/, music/) with a single Laravel app
serving every overlay over HTTP. Supervisord runs `php artisan serve`
on 127.0.0.1:1118 and the OBS scene JSON now references HTTP routes
instead of file:// URLs.
Highlights:
- public/css/hud.css consolidates the duplicated HUD chrome,
scanlines/vignette/flicker, terminal styling, and pulse keyframes
that were copy-pasted across all seven scenes.
- Blade partials own hud-strip, crt-overlays, obs-ws-scripts,
camera-frame, screen-frame; the seven scenes extend a shared
overlay layout.
- Artisan commands (`rig:setup`, `rig:telemetry`, `rig:loading`,
`rig:playlist`, `rig:cmd`) replace the shell scripts that wrote
per-rig JSON snapshots. TwitchHelix + HardwareSnapshot services
handle the work the bash + Python helpers used to.
- ObsWsClient + MusicCommandController kill the 250 ms cmd.js poll
in the music daemon: POST /cmd/{skip|prev|pause|resume} opens a
short-lived Pawl WS, authenticates, and broadcasts mpd:cmd.
- AudioController streams files from the configured music dirs so
CEF can load tracks under the HTTP origin (Chromium blocks
HTTP-origin pages from loading file:// media).
- DataController serves /data/playlist.js (with ETag mtime cache)
and /cover.jpg (no-store) so the existing overlays' window.__PLAYLIST
and cover.jpg cache-bust pattern keeps working.
scripts/obs-webapp.supervisord.conf is the supervisord unit; install
to /etc/supervisor.d/obs-webapp.conf.
scripts/rewrite-scene-urls.py is a one-shot tool that rewrites
basic/scenes/Default_Stream_HUD.json from file:// to HTTP URLs.
basic/scenes/Default_Stream_HUD.json.pre-webapp is the rollback
artifact (made with OBS closed; full pre-migration state).
The seven old scene directories, vendor/, and the bash scripts are
still on disk pending visual verification; the next commit will
prune them.
This commit is contained in:
34
webapp/resources/views/index.blade.php
Normal file
34
webapp/resources/views/index.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>OPHI-118 / overlays</title>
|
||||
<style>
|
||||
body { background:#0a0e0a; color:#5fdc62; font:14px/1.6 monospace; padding:24px; }
|
||||
a { color:#97f99a; }
|
||||
h1 { color:#4fd2ff; letter-spacing:.2em; font-size:14px; margin-bottom:12px; }
|
||||
ul { list-style:none; padding:0; }
|
||||
li { padding:3px 0; }
|
||||
small { color:#2c8d2f; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>OPHI-118 SCENE OVERLAY APP</h1>
|
||||
<ul>
|
||||
<li><a href="/landing">/landing</a> <small>— stand-by</small></li>
|
||||
<li><a href="/loading">/loading</a> <small>— project load + countdown</small></li>
|
||||
<li><a href="/game">/game</a> <small>— game HUD (camera-tracked)</small></li>
|
||||
<li><a href="/desktop">/desktop</a> <small>— desktop HUD (camera + screen)</small></li>
|
||||
<li><a href="/goodbye">/goodbye</a> <small>— sign-off</small></li>
|
||||
<li><a href="/music-box">/music-box</a> <small>— full music box</small></li>
|
||||
<li><a href="/music-box/widget">/music-box/widget</a> <small>— 549×880 widget</small></li>
|
||||
<li><a href="/music-box/cover">/music-box/cover</a> <small>— cover art</small></li>
|
||||
<li><a href="/music-box/cover?bars=0">/music-box/cover?bars=0</a> <small>— compact cover</small></li>
|
||||
<li><a href="/music-box/nc">/music-box/nc</a> <small>— ncurses-styled music box</small></li>
|
||||
<li><a href="/music-daemon">/music-daemon</a> <small>— audio worker</small></li>
|
||||
<li> </li>
|
||||
<li><a href="/data/playlist.js">/data/playlist.js</a> <small>— window.__PLAYLIST</small></li>
|
||||
<li><a href="/cover.jpg">/cover.jpg</a> <small>— album art</small></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user