Remove createInputFrom, changed meaning of PathedSource, add CustomPathedSource

This commit is contained in:
Vanilagy
2026-04-21 13:22:10 +02:00
parent d12c48562c
commit 2b3e5f45c6
16 changed files with 349 additions and 428 deletions
+5 -2
View File
@@ -630,9 +630,12 @@ await conversion.execute();
## Reading HLS playlists
```ts
import { createInputFrom, HLS_FORMATS, desc } from 'mediabunny';
import { Input, UrlSource, HLS_FORMATS, desc } from 'mediabunny';
const input = createInputFrom('https://example.com/master.m3u8', HLS_FORMATS);
const input = new Input({
source: new UrlSource('https://example.com/master.m3u8'),
formats: HLS_FORMATS,
});
// Get all tracks
const tracks = await input.getTracks();