mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 10:53:50 +02:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user