You may wonder “why not a standalone server?”. That's a fair question.
Being a Node.js module, mediasoup is easily integrable within larger Node.js applications. Consider that mediasoup just handles the media plane (audio/video streams) so the application needs some kind of signaling mechanism. Having both the signaling and the media handlers working together makes the application architecture easier.
All those using others languages/platforms for the signaling plane would need to develop their own communication channel with a standalone Node.js server running mediasoup (or wait for somebody to do it).
Not exactly. Native addons are Node.js extensions written in C/C++ that can be loaded using
require() as if they were ordinary Node.js modules.
Instead, mediasoup launches a set of C++ child processes (media workers) and communicates with them by means of inter-process communication. This approach leads to a media worker design not tiled to the internals of Node.js or V8 (which change in every new release).
That's a wrong question. mediasoup does not provide any network signaling protocol to communicate with endpoints/browsers. It just handles the media layer.
It's up to the application developer to build his preferred signaling protocol or choose an existing one (let it be SIP, XMPP, HTTP/WebSocket+JSON, or whichever custom protocol) and integrate it with mediasoup.
By providing a similar API, the developer does not need to learn yet another WebRTC API when it comes to write a mediasoup based application.
Yes! mediasoup provides a high-level API (on top of the ORTC API) that exposes a subset of the W3C WebRTC 1.0 API.
Check the webrtc module documentation.
Given that mediasoup does not handle the signaling plane, it's hard to provide a “full application example”. The API, the Guide and the existing test units should be sufficient for the developer to learn how to use it.
No. All the peers in a room must support a common subset of audio and video codecs. Said that, WebRTC defines a list of MTI (“mandatory to implement”) audio/video codecs, so in a world of happy unicorns this topic should not be a problem.
This is a WebRTC SFU so, as far as the endpoint supports the WebRTC media requirements (ICE, DTLS-SRTP, MTI codecs, multi-stream, etc.), it can join a mediasoup room.
However, these requirements are not usually satisfied by existing SIP devices so a media gateway may be required. We consider that such a task (translating the old world to the new one) is best done outside mediasoup.
Regardless both have basic WebRTC support, neither Asterisk nor FreeSwitch support multiple audio/video streams over the same RTP flow.
Or to put it another way, a legacy telephony call cannot join a mediasoup room expecting a single mixed audio back.