Atom Electron: Render Canvas in Another Window

I have an Electron app with two BrowserWindows. The first manages multiple mediastreams which are rendered onto a canvas. When running the app in the browser I can access the canvas in a popup using the document reference provided by Is something like this possible in Electron?

Is it possible to pass a CanvasRenderingContext2D using the ipcRenderer to the other window? Or via a global on the main process?

Leave a Reply

2 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
newest oldest most voted
Notify of

ipcRenderer and ipcMain do not support complex things transfer like objects or functions. You need to send your instructions from your first BrowserWindow to your main process, then the main process should send an instruction (like a string) to your second window that should handle it.

If you want to transfer streams, you will have to create a localhost server and use a socket library (, coupled with the corresponding npm package, for example


Maybe WebRTC could work for you, example: