I have problem with this block of code.
ctx.drawImage(document.getElementById("videoScreen"), 0, 0);
imgData = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height).data;
if (sendFullScreenshot || lastFrame == undefined) {
sendFullScreenshot = false;
croppedFrame = new Blob([electron.nativeImage.createFromDataURL(ctx.canvas.toDataURL()).toJpeg(100), new Uint8Array(6)]);
}
The error is:
Can someone help me?
toJpeg
totoJPEG
, docs here: electronjs.org/docs/api/native-image#imagetojpegquality – num8er