[Video module]: Use Offscreen Canvas instead of Offscreen Framebuffer
this is an attempt, in trying to use emscripten to render in an offscreen canvas from a pthread. But this does not work.
A possible workaround would be to add bitmaprenderer support, to avoid having to transfer control to a pthread.
UI:
<canvas id="canvas"></canvas>
<script>
var bitmapcontext = document.getElementById("canvas").getContext("bitmaprenderer");
var worker = new Worker("./worker.js");
worker.onmessage = function (evt) {
var bitmap = evt.data.bitmap;
bitmapcontext.transferFromImageBitmap(bitmap);
};
</script>
Edited by Mehdi Sabwat