why sdp not update when receiving onicecandidate event
See original GitHub issueI know in chrome, If I invoke createOffer then I will receive a new SDP, and then I will receive onicecandidate event. Once I receive the event I find that the sdp has been inserted new candidates and local ip and audio/video port.
the result of chrome like this:
`m=video 50838 UDP/TLS/RTP/SAVPF 96 98 100 102 127 97 99 101 125
c=IN IP4 10.20.14.3
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3740516137 1 udp 2122260223 10.20.14.3 50838 typ host generation 0 network-id 3 network-cost 50
a=candidate:3162337153 1 udp 2122194687 169.254.78.22 55524 typ host generation 0 network-id 2
a=candidate:594633900 1 udp 2122129151 192.168.17.136 55765 typ host generation 0 network-id 1 network-cost 10
a=candidate:2423276505 1 tcp 1518280447 10.20.14.3 9 typ host tcptype active generation 0 network-id 3 network-cost 50
a=candidate:4076770161 1 tcp 1518214911 169.254.78.22 9 typ host tcptype active generation 0 network-id 2
a=candidate:1844615260 1 tcp 1518149375 192.168.17.136 9 typ host tcptype active generation 0 network-id 1 network-cost 10 `
But in ‘react-native-webrtc’ I find nothing change.
I want to know if do not change sdp is the expect result in ‘react-native-webrt’? Or It can change SDP automatic if I have an anther configuration.
- React Native version: 0.44.3
- Plugin version: 1.58.1
- OS: : 10.3.1 iOS / iPhone 7
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I believe it is the default behavior for
trickle ice
inwebrtc
library at least in the very first call.This lib doesn’t implement
sdp
getter to refresh new sdp with candidates from native. ( not sue which is correct way though )But if you invoke
createOffer
orcreateAnswer
AGAIN AFTER all ice candidates has been gathered, then you would get sdp with all candidates returned from native.And you don’t have to call
setLocalDescription
again after the second call tocreateOffer
.see #242 for related discussion.
Fixed in https://github.com/react-native-webrtc/react-native-webrtc/commit/6c77279b07c0f1361062aea048d310850e7ecf88