// web_sys does not provide this functionality out of the box
// (perhaps because of low-ish browser support?)
// so it must be implemented manually here in JavaScript
exportfunctioncaptureStreamFromCanvas(canvas){constmediaStream=canvas.captureStream();returnmediaStream;}