|
RTCPeerConnection is central to WebRTC, it's the main p2p connection. In Node you use the same thing. The server is just another "peer". We wrap @roamhq/wrtc with SimplePeer, which, funnily enough heh, greatly simplifies things! :) RTCPeerConnection is central to simple peer. The other library does say it has a different API, on its homepage: Easy to Use - The API design is similar to the browser's WebRTC API, which reduces the learning cost. From: https://shinyoshiaki.github.io/werift-webrtc/website/build/ Regarding native binaries we have not had any issues so far, mainly as the prior major wrtc provided pre-built binaries for every major platform. I think the new one posted here expands the set of targets. I do recall encountering a few obstacles with various addons from different libraries in different projects in the past, and node-gyp was occasionally involved. Tho I don't recall it being particularly troublesome, nor preventing us doing what we wanted. In fact I fondly recall node-pre-gyp or whatever usefully creating a build for the current target on the fly on install, which was fantastic and convenient, magic. In the worst case to build for a custom arch, I consider these types of things a configuration issue, nothing insurmountable. Stepping back, I think a lot of these concerns will eventually go away, or you can currently make them go away, with wasm. Which, while not at C++ perf level, is adequate and a significant speedup on node for some computationally intensive tasks. I'm interested to know more about what particular issues have you had with native addons and node-gyp in the past and what you are currently using WebRTC for, if you're interested to share. |
https://github.com/potmat/homebridge-google-nest-sdm
Since this is for home automation the system runs on all kinds of weird devices, from RPi's to NAS's to old laptops etc. When I tried to use anything requiring platform specific binaries it was a complete mess, most of the time things would not build.
The problem may not be insurmountable if you're being paid, but since this is just done in my spare time it's not something I wanted to deal with.