First of all, my sincere gratitude to everyone involved with mediasoup, this is an amazing project and extensively documented.
I have been reading the documentation trying to understand some of the configuration options of mediasoup. I encountered the term “listenIp” in many situations and once i looked at the documentation and followed WebRtcTransportOptions.listenIps-> TransportListenIp[]->ip: “Listening IPv4 or IPv6” i felt like i got nowhere because the only specific information was that it could be ipv4 or ipv6.
So, exactly was it the listenIp used for? At one moment i though that it was the ip of the “unit” in “selective forwarding unit”, in the sense that ot was the ip of the seever used to relay media between peers, now i am beggining to think its the ip of the server used to exchange spd offers between peers, but i think i am still confused.
In most of the use cases i saw there is a http or webcocket server that receives requests and calls the mediasoup API to create transports and what not, are those the requests you are referring to?
I guess i get it. But one more question to confirm it, if i setup a websocket in the same node.js app i use with the medisoup module, do i need to set the listenIp to the same ip i used for the websocket server? Or its sufficient that the listenIp is externally reachable?
There’s no requirement that the mediasoup transports use the same listen IP as your websocket. The mediasoup library isn’t concerned with how your app does signaling, and has no concept of websockets or http.
It may very often be the case that the websocket and mediasoup transports use the same IP, but not necessarily. For example, your node websocket listener might be on a private IP that is only accessibly by a load balancer or something that terminates TLS, while your mediasoup transports are listening on publicly accessible IPs.
It’s not intended to be beginner friendly, if you expect that I am sorry but a video-game be easier to make for a beginner…
At least if you learned to program a video-game, you would eventually learn to network them (multi-player) and then want voice communication landing you at RTP… fun all along the way.