I have this code in the .js file that allows me to stream an image:
//Image streamaing!
function onMessage2(evt) {
$("#image").attr('src', 'data:image/jpg;base64,'+evt.data);
}
I then display it in a rectangle in html like so:
<div class="row" style="margin-left:0px; margin-right:0px">
<img id="image" src="">
<canvas id="canvas"></canvas>
</div>
The problem I have is that I need the stream to be displayed in the background of the canvas, so I can catch mouse/touch input for some other work I need.
I've tried switching the order (canvas first then image) but then all I get is a big blank screen.