TX_WEBRTCADDITIONALHOSTS Specifies whether multiple values can be set #3360
-
QuestionCan I set multiple values for MTX_WEBRTCADDITIONALHOSTS? The same mediamtx supports ip address and domain name access at the same time. If yes, what should I do |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
WebRTC-specific features Make sure that webrtcAdditionalHosts includes your public IPs, that are IPs that can be used by clients to reach the server. If clients are on the same LAN as the server, then insert the LAN address of the server. If clients are coming from the internet, insert the public IP address of the server, or alternatively a DNS name, if you have one. You can insert multiple values to support all scenarios: webrtcAdditionalHosts: [192.168.x.x, 1.2.3.4, my-dns.example.org, ...] |
Beta Was this translation helpful? Give feedback.
-
Hello, yes you can, in order to do it with environment variables it's enough to use commas:
|
Beta Was this translation helpful? Give feedback.
WebRTC-specific features
Connectivity issues
If the server is hosted inside a container or is behind a NAT, additional configuration is required in order to allow the two WebRTC parts (server and client) to establish a connection.
Make sure that webrtcAdditionalHosts includes your public IPs, that are IPs that can be used by clients to reach the server. If clients are on the same LAN as the server, then insert the LAN address of the server. If clients are coming from the internet, insert the public IP address of the server, or alternatively a DNS name, if you have one. You can insert multiple values to support all scenarios:
webrtcAdditionalHosts: [192.168.x.x, 1.2.3.4, my-dns.example.org…