Phase 12: frame-accurate timecode via an overscan band — vgstrip encoder/decoder, sweep writes tmcd + creation_time + sidecar, dumpd /time, Caddy /time routes, MediaMTX microsecond names, /dock/clock/ page, dock band setup via obs-websocket, Go Live band composite + toggle, portal crops the band

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 16:07:56 -05:00
parent 89841c3d2a
commit 3fcb8fbe99
18 changed files with 515 additions and 25 deletions

26
dock/clock/index.html Normal file
View File

@@ -0,0 +1,26 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Vanguard Clock</title>
<style>html,body{margin:0;background:#000;overflow:hidden}canvas{display:block}</style>
</head>
<body>
<canvas id="c"></canvas>
<script src="vgclock.js"></script>
<script>
// OBS browser source for the overscan band: size it to the band (width = canvas width, height = band).
// It draws the server-synced strip + readable clock at the display rate. ?text=0 hides the readable clock.
(async () => {
const c = document.getElementById('c'), ctx = c.getContext('2d', { alpha: false });
const q = new URLSearchParams(location.search);
const showText = q.get('text') !== '0';
function fit() { c.width = Math.max(160, window.innerWidth); const { band } = VGClock.geometry(c.width); c.height = Math.max(band, window.innerHeight || band); }
fit(); window.addEventListener('resize', fit);
await VGClock.resync('/time');
setInterval(() => VGClock.resync('/time'), 60000);
(function frame() { VGClock.drawBand(ctx, c.width, 0, { text: showText }); requestAnimationFrame(frame); })();
})();
</script>
</body>
</html>