From debbfaa1f0173d5be08fe40c27b12764f18d41ad Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 19 Oct 2026 00:43:48 -0700 Subject: live: 1 s HLS segments (keyframes every second), 10 in the live window — a player starts about three segments behind the edge, so most of a viewer's delay was the 2 s segments (8.6 s behind the broadcaster, measured; 4.5 s with these). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg --- live/server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'live/server.js') diff --git a/live/server.js b/live/server.js index 3238574..9bba15c 100644 --- a/live/server.js +++ b/live/server.js @@ -84,8 +84,10 @@ const ADMINS = Array.isArray(CONFIG.admins) ? CONFIG.admins : ['98ae4da926c471c2 const ALERT_SK = /^[0-9a-f]{64}$/.test(CONFIG.alertSk || '') ? Uint8Array.from(Buffer.from(CONFIG.alertSk, 'hex')) : null; const NAME_MIN_AGE = +(process.env.LIVE_NAME_MIN_AGE_H || 24) * 3600_000; const DM_RELAYS = ['wss://relay.coinos.io', 'wss://relay.damus.io', 'wss://nos.lol']; -const WINDOW = 8; // segments in the live playlist -const SEG = 2; // seconds a segment +const WINDOW = 10; // segments in the live playlist +// seconds a segment: a player starts about three segments behind the live +// edge, so this is most of a viewer's delay (2 s segments: 8.6 s behind) +const SEG = 1; mkdirSync(DATA, { recursive: true }); const REMOVED = `${DATA}/.removed`; -- cgit v1.2.3