![]() Then we could probably achieve a "pure JS" (no npm compile step) implementation of Data Channel. There is a chance that Node.js could expose the DTLS implementation from OpenSSL, since that's already part of Node. His code is here: It's also not trivial since it requires a DTLS (TLS over UDP) implementation, and it's not exactly trivial to write one of those in JS. Launching a whole Chromium instance when you need a socket is, like, not ideal.Īnother idea: how about implementing just the parts needed for Data Channel in JavaScript? A former Mozilla engineer, now Google engineer, actually tried this but gave up before finishing. The other library, `electron-webrtc` literally launches a hidden instance of Electron and communicates with it over IPC from Node.js, which means it runs everywhere that Electron does (without waiting for anything to compile!), but it's a pretty heavy-handed approach. Not fun to wait an hour after typing 'npm install'. ![]() And if you're unlucky enough to be on a platform that they haven't made a prebuilt binary for, then you have to wait an hour for a bunch of Chrome-specific build tools to download and compile the library locally. `wrtc` uses the Google library which is overly complex since it includes lots of code for dealing with complex video/audio codec stuff that isn't needed to open a simple data channel. The two best implementations on npm are `wrtc`: and `electron-webrtc`: īoth have serious shortcomings. I'm the author of WebTorrent, and let me tell you that getting WebRTC to run server-side is not fun.
0 Comments
Leave a Reply. |