Add better doc blocks, special deprecated logic for API doc generation, add multi-tiered SegmentedInput hydration for reducing file request count, ditch VirtualInputFormat indirection

This commit is contained in:
Vanilagy
2026-04-13 17:25:46 +02:00
parent 051578c2ca
commit 2a2b6450c9
8 changed files with 409 additions and 275 deletions
+18 -1
View File
@@ -204,7 +204,7 @@ test.concurrent('Big Buck Bunny', { timeout: 15_000 }, async () => {
expect(await input.getDurationFromMetadata()).not.toBe(null);
});
test.concurrent('Big Buck Bunny codec parameter strings from master playlist', { timeout: 15_000 }, async () => {
test.concurrent('Big Buck Bunny, codec parameter strings from master playlist', { timeout: 15_000 }, async () => {
using input = createInputFrom('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8', ALL_FORMATS);
let sourceCount = 0;
@@ -228,6 +228,23 @@ test.concurrent('Big Buck Bunny codec parameter strings from master playlist', {
expect(sourceCount).toBe(1);
});
test.concurrent('Big Buck Bunny, determining duration from metadata', { timeout: 15_000 }, async () => {
using input = createInputFrom('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8', ALL_FORMATS);
let sourceCount = 0;
input.on('source', () => sourceCount++);
const track = await input.getPrimaryVideoTrack();
assert(track);
expect(sourceCount).toBe(1);
const approxDuration = await track.getDurationFromMetadata();
expect(approxDuration).toBe(634.567);
expect(sourceCount).toBe(2); // We needed to read the playlist, but not any segment
});
test.concurrent('Single-variant Big Buck Bunny', { timeout: 15_000 }, async () => {
using input = createInputFrom('https://test-streams.mux.dev/x36xhzz/url_6/193039199_mp4_h264_aac_hq_7.m3u8', ALL_FORMATS);