mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Remove createInputFrom, changed meaning of PathedSource, add CustomPathedSource
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user