diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/live-ingest-test.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/live-ingest-test.js b/tools/live-ingest-test.js index c760679..3af0456 100644 --- a/tools/live-ingest-test.js +++ b/tools/live-ingest-test.js @@ -112,7 +112,7 @@ try { const done = await text(`${HTTP}/${id}/index.m3u8`); check('ending closes the playlist: the recording', /ENDLIST/.test(done.body) && /PLAYLIST-TYPE:VOD/.test(done.body)); check('...the live one ends too', /ENDLIST/.test((await text(`${HTTP}/${id}/live.m3u8`)).body)); - const total = segs(done.body).length * 2; + const total = Math.round([...done.body.matchAll(/#EXTINF:([\d.]+)/g)].reduce((n, m) => n + +m[1], 0)); check('...about the length sent (12 s + 7 s)', total >= 14 && total <= 24, total + ' s'); check('a stream that never was: 404', (await fetch(`${HTTP}/0123456789abcdef/live.m3u8`)).status === 404); const c = await connect(`auth=${auth(SK)}&name=alice`); |
