-
It’s an SFU server
-
You can easily find a lot of information about WebRTC on the net, for example at https://webrtchacks.com/. In short, it goes like that:
- before starting the transmission, the session is negotiated (network addresses, certificates, tracks, codecs etc) using the SDP offer-answer model and Interactive Connectivity Establishment (ICE) candidates, usually via WebSocket/Phoenix channel
- media connection is established via ICE
- media encryption keys are exchanged through the media connection via DTLS
- then the browser gets the track (in this case audio samples) from the microphone, encodes it (usually with OPUS), packs it into Real-time Transport Protocol (RTP) and encrypts it (so it becomes SRTP)
- the encrypted stream is sent through the ICE media connection (usually via UDP)
- if the connected peer is the Membrane server, it unpacks the audio (OPUS) stream with Membrane.WebRTC.EndpointBin. That bin consists of the ICE endpoint with DTLS handshake, and the RTP bin, that handles SRTP, SRTCP and some of their extensions.
- at that point, you can do anything with the received stream, while the Membrane server just passes it to Endpoint Bins of all other peers in the room
- each Endpoint Bin packs the stream to RTP, encrypts to SRTP and sends via ICE sink
- each peer’s browser gets the stream, decrypts, unpacks, decodes to raw audio and plays out


















