aboutsummaryrefslogtreecommitdiffstats
path: root/tools/live-stream-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-19 00:44:32 -0700
committerAdam Soltys <[email protected]>2026-10-19 00:44:32 -0700
commitc39c565630f3a09b76da7a3f0a4d7a37945e0325 (patch)
tree2b6b197bd3488b5739f641ba4b0f2bd207653af3 /tools/live-stream-test.js
parente571187361ec9af1db8fba9050c23ec10db677f4 (diff)
downloadcoinosv3-c39c565630f3a09b76da7a3f0a4d7a37945e0325.tar.gz
coinosv3-c39c565630f3a09b76da7a3f0a4d7a37945e0325.zip
Watching a stream: a stream that's on plays through hls.js, held near the live edge (1.5 s back, up to 1.1× when it drifts past 5 s) — Chrome's own HLS player starts three segments back, never catches up, and fails outright (DEMUXER_ERROR_COULD_NOT_PARSE) if a page changes its speed. With the live server's 1 s segments a viewer is 3.5 s behind the broadcaster, from 8.6 s (go-live-test LATENCY=1 measures it: the broadcaster's camera is a clock in black and white blocks, read off the viewer's frame). Recordings, and streams where hls.js can't run (iOS), stay on the browser's player.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg
Diffstat (limited to 'tools/live-stream-test.js')
-rw-r--r--tools/live-stream-test.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/live-stream-test.js b/tools/live-stream-test.js
index 0deb48c..440be36 100644
--- a/tools/live-stream-test.js
+++ b/tools/live-stream-test.js
@@ -183,7 +183,8 @@ try {
await page.evaluate(() => document.querySelector('.live-grid:not(.live-past) .live-tile').click());
check('a tap opens it, the address bar naming the stream', await waitFor(() => !!document.querySelector('.live-page'), 5000) && await waitFor((n) => location.pathname === '/' + n, 5000, NADDR), await page.evaluate(() => location.pathname));
check('the stream plays', await waitFor(playing, 20000), JSON.stringify(await page.evaluate(() => { const v = document.querySelector('video.live-video'); return v && { t: v.currentTime, paused: v.paused, err: v.error && v.error.code, src: v.currentSrc.slice(0, 60) }; })));
- check('...from its playlist, natively in Chrome', await page.evaluate((s) => document.querySelector('video.live-video').currentSrc === s, STREAM));
+ // a stream that's on plays through hls.js (kept near the live edge), not Chrome's own player
+ check('...through hls.js, kept near the live edge', await page.evaluate(() => document.querySelector('video.live-video').currentSrc.startsWith('blob:')));
check('the chat shows what was said', await waitText('hello from the chat', 8000));
check('...and the zap, its amount and words', await waitText('zapped 21 sats', 5000) && await waitText('great stream', 1000));
const rowSel = '.live-message[data-key="' + chat.id + '"]';