###Mediasoup is an SFU(Selective Forwarding Unit) which receives audio and video streams from endpoints and relays them to everyone else
Device Loading
rtpCapabilities
of a router from the server and uses the information to load deviceCreate WebRTCTransport
sendTransport
and a localTransport
transports
must be created both in the client-side and the server-sideConnect WebRTCTransport
sendTransport.produce()
or recvTransport.consume()
in the client side.dtlsParameter
of the device used to make a WebRTC connection.Produce
sendTransport.produce()
in the client-side, sendTransport.on("connect")
event is fired.sendTransport.on("produce")
event is fired, which creates a producer in the server-side.Consume
producer
, participants must consume
the other’s producer
.consumer
in the server-side first, and then use socket.io
to let the client-side know that there is a new consumer
created in the server-sideconsumer
using the information from the server-sideGeneral
mediasoup
, transports
, producer
, and consumer
must be created both in the client-side and the server-side. And the client-side and the server-side must create the three components using the same information.