Skip to content

Commit

Permalink
Update enhance.html
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed Apr 18, 2022
1 parent c146950 commit b831616
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/enhance.html
Expand Up @@ -125,6 +125,8 @@ <h3>Output</h3>
.pipeThrough(
new TransformStream({
transform: async (frame, controller) => {
const timestamp = frame.timestamp;
const duration = frame.duration;
canvasCtx.drawImage(frame, 0, 0, canvas.width, canvas.height);
frame.close();

Expand All @@ -148,7 +150,7 @@ <h3>Output</h3>
}

canvasCtx.putImageData(imageData, 0, 0);
controller.enqueue(new VideoFrame(canvas));
controller.enqueue(new VideoFrame(canvas, { timestamp, duration }));
}
})
)
Expand Down

0 comments on commit b831616

Please sign in to comment.