embiem / react-canvas-draw

React Component for drawing in canvas
https://embiem.github.io/react-canvas-draw/
MIT License
892 stars 315 forks source link

Can I use capture stream somehow using CanvasDraw? #96

Closed MatanYemini closed 3 years ago

MatanYemini commented 4 years ago

Hi everyone!

Does it possible to capture the stream from the canvas somehow? could not do it.

I was thinking about something like this: https://developers.google.com/web/updates/2016/10/capture-stream

My end goal is to create a video stream out of it and send it to as a mediatrack in my WebRTC adapter.

Thanks in advance everyone!

MatanYemini commented 3 years ago

While trying to combining the 4 canvas into one stream, it seems like it is not working. any ideas?

MatanYemini commented 3 years ago

Create a new canvas "combined" -> write the layers on its context one-by-one. Pay attention to take the drawing layer on the end