The main issue was with the gRPC library. The support is very limited by now.
Then the JPEG compression is slow in Go and it is CPU intensive.
And finally, I even if I could generate the Mjpeg stream, how
would I display it?
Then I though about the “canvas” mechanism, but I could not address the backend of the canvas without heavy copying between wasm and JS. And remember the size was 2.5Mb.
Anyway, I though that relying on wasm would make me implement a lot of image primitives that are natively accessible in JS (for example image rotation).
In a glimpse:
The main issue was with the gRPC library. The support is very limited by now. Then the JPEG compression is slow in Go and it is CPU intensive. And finally, I even if I could generate the Mjpeg stream, how would I display it?
Then I though about the “canvas” mechanism, but I could not address the backend of the canvas without heavy copying between wasm and JS. And remember the size was 2.5Mb.
Anyway, I though that relying on wasm would make me implement a lot of image primitives that are natively accessible in JS (for example image rotation).
Hope that answers your question.