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.
59 lines
2.3 KiB
PHP
59 lines
2.3 KiB
PHP
<?php
|
|
|
|
return [
|
|
/*
|
|
|---------------------------------------------------------------------------
|
|
| Storage paths
|
|
|---------------------------------------------------------------------------
|
|
| Where the Artisan rig:* commands write their JSON snapshots, and where
|
|
| controllers + DataController read them back.
|
|
*/
|
|
'storage_data' => storage_path('data'),
|
|
'cover_jpg' => env('RIG_COVER_JPG', base_path('../bridges/cover.jpg')),
|
|
'obs_config_js' => env('RIG_OBS_CONFIG_JS', public_path('js/obs-config.js')),
|
|
|
|
/*
|
|
|---------------------------------------------------------------------------
|
|
| OBS sources
|
|
|---------------------------------------------------------------------------
|
|
| Used by Artisan rig:setup and ObsWsClient.
|
|
*/
|
|
'obs_ws_config_json' => env('RIG_OBS_WS_CONFIG_JSON', base_path('../plugin_config/obs-websocket/config.json')),
|
|
|
|
'obs_ws' => [
|
|
'url' => env('OBS_WS_URL', 'ws://localhost:4455'),
|
|
'password' => env('OBS_WS_PASSWORD', ''),
|
|
],
|
|
|
|
/*
|
|
|---------------------------------------------------------------------------
|
|
| Hardware / OBS profile (telemetry)
|
|
|---------------------------------------------------------------------------
|
|
*/
|
|
'rig_name' => env('RIG_NAME'),
|
|
'obs_studio_dir' => env('OBS_STUDIO_DIR', base_path('..')),
|
|
'obs_profile' => env('OBS_PROFILE', 'ophi118'),
|
|
|
|
/*
|
|
|---------------------------------------------------------------------------
|
|
| Music library (playlist indexer)
|
|
|---------------------------------------------------------------------------
|
|
*/
|
|
'music_dirs' => array_values(array_filter([
|
|
env('MUSIC_DIR_1', base_path('../playlist')),
|
|
env('MUSIC_DIR_2', ($_SERVER['HOME'] ?? getenv('HOME') ?: '/home/jin') . '/HDD/Music/Electronic/NCS Directory'),
|
|
])),
|
|
'ffprobe' => env('FFPROBE_BIN', '/usr/bin/ffprobe'),
|
|
|
|
/*
|
|
|---------------------------------------------------------------------------
|
|
| Twitch API
|
|
|---------------------------------------------------------------------------
|
|
*/
|
|
'twitch' => [
|
|
'client_id' => env('TWITCH_CLIENT_ID'),
|
|
'token' => env('TWITCH_TOKEN'),
|
|
'broadcaster_id' => env('TWITCH_BROADCASTER_ID'),
|
|
],
|
|
];
|