Problems about running mediasoup on Mac local env

I’m using mediasoup to run a ui render server app on Mac(Catalina) local, that is to say, to use gstreamer to capture the gui app window and push the VP8 encoded stream to webrtc server, then consume it on web page.

The problem is, when mediasoup is running on Mac host side, everything works fine, but when i put mediasoup to run inside of Docker-for-Mac, then web page consumer cannot setup WebrtcTransport connection from outside of docker.

Running mediasoup on mac host side is OK, but i notice that, when do npm install mediasoup, the install process in fact downloads the full source of mediasoup and compile locally to get a mediasoup-worker binary, which means it’s not easy to get a portable npm package without need of source compilation. I guess it’s dependent on OS version & nodejs version? Why there isn’t a prebuilt mediasoup npm package with a general mediasoup-worker?

#see Cannot setup WebRTCTransport to mediasoup server inside of Docker instance, using ip 127.0.0.1(gstreamer pipeline cmd publisher in docker)

Docker isn’t running natively on macOS, it is running in a VM. Hence localhost in that VM is very different from localhost of your macOS. Read the docs on IPs, it tells you how to configure things in such cases.