Syphon + Electron?


#1

I am interested in connecting Electron with Syphon (http://syphon.v002.info/), a C++ plugin for OSX that shares frames between applications directly on the graphics card.

I have seen a few projects that integrate Syphon with Chromium, such as: https://github.com/vibber/CefWithSyphon, but don’t know how that would work in Electron.

Is this possible in Electron? as a module? where should I start to work on this? Thanks in advance


#2

Electron supports using Native Node modules. I don’t know if a Node module wrapping Syphon is available, but you may want to look into that or look into creating your own.


#3

thanks for the reply @leedohm. I’ve looked into native modules somewhat but am still unclear on applying it in this case…how would the native module get access to electron’s rendering context, in order to pass the entire window to a Syphon server?


#4

There’s the BrowserWindow.getNativeWindowHandle function. I don’t know if that helps.


#5

Have you gotten this to work?


#6

For anyone interested in Syphon integration, you might want to look at Anton Marini’s recent Chromium build. getUserMedia is modified to grab from Syphon contexts, and the stream is transportable over WebRTC.


Here’s a stable app: https://dl.dropboxusercontent.com/u/42612525/Chromium.zip
Would it be possible to modify libchromiumcontent in the same way?
For output from Electron to Syphon, I suspect offscreen rendering to the GPU could feed a Syphon framework, perhaps in a similar fashion as the CefWithCyphon project Olivia mentioned.