mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 19:33:51 +02:00
Remove input track descriptors, add async getters on tracks for everything, deprecate old sync getters
This commit is contained in:
+12
-6
@@ -28,13 +28,19 @@
|
||||
return;
|
||||
*/
|
||||
|
||||
const manifest = new Mediabunny.Input({
|
||||
entryPath: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
|
||||
source: ({ path }) => new Mediabunny.UrlSource(path),
|
||||
formats: Mediabunny.ALL_FORMATS,
|
||||
});
|
||||
const manifest = Mediabunny.createInputFrom(
|
||||
'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
|
||||
Mediabunny.ALL_FORMATS,
|
||||
);
|
||||
|
||||
const audioTrack = await manifest.getPrimaryAudioTrack();
|
||||
const [track] = await manifest.getTracks();
|
||||
console.log(track);
|
||||
|
||||
window.kekw = () => {
|
||||
console.log(track.getFirstTimestamp())
|
||||
};
|
||||
|
||||
return;
|
||||
const ugh = new Mediabunny.EncodedPacketSink(audioTrack);
|
||||
|
||||
for await (const packet of ugh.packets()) {
|
||||
|
||||
Reference in New Issue
Block a user