However i find a problem:
I’m building a demo for streaming WebGL rendered web page content to WebRTC via Electron.
The electron instance(H5 producer) and webrtc server are running in a internal host behind gateway, (gateway opens port mapping)
The H5 page consumer is outside of gateway,
However, it seems outside H5 page consumer can connect to webrtc server, but The electron instance as H5 producer cannot.
I doubt if it’s due to the single annoucedIp config? The localhost electron H5 producer should directly use “127.0.0.1”, while outside H5 consumer uses mapped public ip?
I’m expecting mediasoup to support 2 anouncedIps per single instance:
One is for electron producer on the same node behind NAT gateway with mediasoup, “127.0.0.1” is OK;
The other is NAT gateway’s public ip for outside chrome browser page consumer to access.
Hi, i thought maybe i could create 2 routes: one is for the same-host electron producer instance, using local lan ip(not 127.0.0.1, since chrome doesn’t support it), the other for outside chrome page clients, using gateway’s public ip,
After re-looking at the API document, and the code which i modified from sample, I realize that, as to mediasoup, there is 3 hierarchies:
worker → router → transport
listenIp/anounceIp is transport-level config, so i can created 2 different WebRtcTransport using different listenIp/anounceIp config for internal electron producer and outside chrome consumers, they’re in the same router!