...
Internal TURN server should be set up using the following parameters in Settings file flashphoner.properties file:
...
Parameter | Default value | Description |
---|---|---|
turn_ip | - | Internal TURN server IP address (by default is the same as ip) |
turn_ip_local | - | Internal TURN server local IP address , should be used for port binding (by default is the same as ip_local) |
turn_port | 3478 | Internal TURN server TCP port |
turn_password | coM77EMrV7Cwhyan | Internal TURN server password (username is flashphoner ) |
turn_media_port_from | 36001 | Beginning of media UDP ports range for WebRTC connection between TURN and WCS |
turn_media_port_to | 37000 | End of media UDP ports range |
turn_media_ports_auditor_interval | 5000 | Audit interval for busy and free ports, in milliseconds |
turn_media_ports_auditor_max_attempts | 3 | Number of audits to make sure freed port is not bound |
turn.server_channel_receive_buffer_size | 1048576 | Receive buffer size in bytes |
turn.server_channel_send_buffer_size | 1048576 | Send buffer size in bytes |
...
Code Block | ||||
---|---|---|---|---|
| ||||
Flashphoner.createSession({urlServer: url, mediaOptions: {"iceServers": [ { 'url': 'turn:test.flashphoner.com:3478?transport=tcp', 'credential': 'coM77EMrV7Cwhyan', 'username': 'flashphoner' } ]}}) |
If UDP ports are not blocked by firewall, browser may establish WebRTC connection through UDP. In this case, "iceTransportPolicy": "relay"
parameter should be set in mediaOptions
...
If this step is successful, go to 3a3b, if ports cannot be blocked, go to 3b3a
3. Open Firewall Traversal Streaming application, set the following to TURN server
Code Block | ||
---|---|---|
| ||
turn:test.flashphoner.com:3478?transport=tcp |
Where
- test.flashphoner.com is WCS server hostname
- 3478 internal TURN server port
a) if UDP ports on WCS server are not blocked, uncheck Force relay
...
4. Press Connect
, enter stream name test
and press Publish
. Stream publishing starts through internal TURN server.
Known issues
1) . The Microsoft Legacy Edge and Mozilla Firefox browser does not connect via the TURN server
Symptoms: publishing/playing do not work when trying to connect through the TURN server
Solution: use Chrome browser or its successors.