by fidotron · 1y ago · 0 comments
My experience of it in Java/C++/Golang is in every case you have to deal with all the problems far more upfront before any of it works at all. And JS doesn't have the multithreaded aspect to handle, which is also the major weakness as it eliminates the extensability in that environment.
I have a sort of proof of concept level SFU in golang, with a simple TypeScript/React client, and the whole client is this: https://github.com/atomirex/umbrella/blob/master/frontend/sr... and most of the complexity there is because I can never remember if track ID or transceiver MID should be used in different situations!
I have done native mobile libwebrtc work, and that's several other levels of complexity from all this, but with that you can do things like hardware accelerated neural net integration quite easily because of how it's all structured.
I seem to recall one browser always prefixes the buffers with sequence numbers, for example. Really fun stuff like that, but I would hope that is history by now.
My preference would be to use the standard webrtc api, and then use a polyfill style library for uniform behaviour if you don't want to worry about it (which it sounds like simple-peer might be).
In the event you want a much higher level API and pre-rolled signalling server etc. my go to recommendation on that would be https://livekit.io/ which I am not affiliated with, but I tend to think people starting out should try that and then be able to explain why they're not using it, much in the same way I would expect a game dev to try using Unreal and have a good reason if they aren't planning on using it.