IPv6 support for WebRTC is added since build 5.2.660. This led to some changes in configuration settings and connection establishing procedure.
By default, IPv6 support is disabled. To enable this feature, the following should be done:
- in flashphoner.properties file set the external IPv6 server address and allow IPv6 candidates
- in wcs-core.properies file allow IPv6 stack
Tje following settings can be used to set comma separated IPv4 and IPv6 interfaces to bind
Connection establishing procedure
Connection establishing to exchange WebRTC media traffic now looks as follows:
1. Server waits for incoming Binding Request queries to IPv4 and IPv6 interfaces.
2. When a query with USE-CANDIDATE attribute is received, the candidate is marked as nominated to use, if Binding Response would be received,
3. For every browser Binding Request server sends Binding Response.
4. At the same time, server sends Binding Request to browser. Requests will be repeated if necessary with the following period (1500 ms by default)
5. When Bindind Response is received from the first candidate, the timeout is started to wait for another candidates as set in the following parameter (1000 ms by default)
6. When timeout is finished, server sends DTLS Client Hello to the priority candidate
When establishing connection with Safari browser, IPv4 candidates are preferred unless some problem in STUN-DTLS procedure occur with such candidate. Therefore, in Safari IPv4 will be used if client has both IPv4 and IPv6 interfaces working and traffic between client and server is not blocked. In other browsers (see example pictures above) IPv6 candidates are preferred.
1. WebRTC publishing/playback doe not work in any browser on IPv6 only host
Symptoms: stream publishing or playback fails with
Failed by ICE timeout error
Solution: If a host has only IPv6 address (and localhost), ICE candadates exchange does not work,
RTCPeerConnection.onicecandidate event is nor fired in most browsers. Use RTMP to publish and RTSP, RTMP, HLS to play.