Rewrite reader logic, add separate reader for caching MP4 chunks, add more advanced drain iterators

This commit is contained in:
Vanilagy
2024-12-08 20:04:47 +01:00
parent ecfd193ae0
commit 5978110de9
12 changed files with 691 additions and 355 deletions
+1 -3
View File
@@ -27,13 +27,11 @@
const context = canvas.getContext('2d');
// Top-level for await loop inside the event listener
for await (const frame of drain.frames(await videoTrack.getDuration() - 10)) {
for await (const frame of drain.frames()) {
context.drawImage(frame, 0, 0, width, height);
frame.close();
}
console.log("Here??")
/*
const videoTrack = await input.getPrimaryVideoTrack();
const drain = new Metamuxer.VideoFrameDrain(videoTrack);