File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -671,7 +671,14 @@ extension Engine: TransportDelegate {
671
671
self . log ( " subscriberPrimary: \( joinResponse. subscriberPrimary) " )
672
672
673
673
// update iceServers from joinResponse
674
- self . _state. mutate { $0. connectOptions. rtcConfiguration. set ( iceServers: joinResponse. iceServers) }
674
+ self . _state. mutate {
675
+ $0. connectOptions. rtcConfiguration. set ( iceServers: joinResponse. iceServers)
676
+ if joinResponse. clientConfiguration. forceRelay == . enabled {
677
+ $0. connectOptions. rtcConfiguration. iceTransportPolicy = . relay
678
+ } else {
679
+ $0. connectOptions. rtcConfiguration. iceTransportPolicy = . all
680
+ }
681
+ }
675
682
676
683
self . subscriber = try Transport ( config: self . _state. connectOptions. rtcConfiguration,
677
684
target: . subscriber,
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ extension RTCConfiguration {
27
27
result. sdpSemantics = . unifiedPlan
28
28
result. continualGatheringPolicy = . gatherContinually
29
29
result. candidateNetworkPolicy = . all
30
- // don't send TCP candidates, they are passive and only server should be sending
31
- result. tcpCandidatePolicy = . disabled
30
+ result. tcpCandidatePolicy = . enabled
32
31
result. iceTransportPolicy = . all
33
32
34
33
result. iceServers = [ DispatchQueue . webRTC. sync { RTCIceServer ( urlStrings: defaultIceServers) } ]
You can’t perform that action at this time.
0 commit comments