Skip to content

Instantly share code, notes, and snippets.

@x-labz
Created February 2, 2022 15:09
Show Gist options
  • Save x-labz/a06c2c0b60dc57211b398e9acd96dbff to your computer and use it in GitHub Desktop.
Save x-labz/a06c2c0b60dc57211b398e9acd96dbff to your computer and use it in GitHub Desktop.
webgl-transformer-canvas
// gl.readPixels(0, 0, W, H, gl.RGBA, gl.UNSIGNED_BYTE, bufferRGB);
const init = {
timestamp: videoFrame.timestamp,
codedWidth: W,
codedHeight: H,
format: "RGBA",
};
//const newFrame = new VideoFrame(bufferRGB, init);
const newFrame = new VideoFrame(gl.canvas, init);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment