Circuit JS-SDK examples

Share HTML Canvas as MediaStream

This example shows a schematic in a HTML5 canvas and allows drawing on top of it and shares the combined image in the call.
The application can use the new HTMLCanvasElement.captureStream API available in Chrome and Firefox to capture a stream from a canvas.
Note that Chrome has an issue with compression which causes WebRTC to reduce the resolution, or not even show the drawing.
Use FireFox in the meantime.